diff --git a/contracts/BaseReserveManager.sol b/contracts/BaseReserveManager.sol new file mode 100644 index 0000000..805d430 --- /dev/null +++ b/contracts/BaseReserveManager.sol @@ -0,0 +1,131 @@ +//SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.10; + +import '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol'; + +import './interfaces/LendingInterfaces.sol'; +import './interfaces/AerodromeInterfaces.sol'; +import './libraries/SafeToken.sol'; + +import './BaseRewardManager.sol'; + +contract BaseReserveManager is AccessControlUpgradeable { + using SafeToken for address; + + bytes32 public constant DISTRIBUTOR_ROLE = keccak256('DISTRIBUTOR_ROLE'); + + /* Tokens */ + + address public constant usdc = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913; + address public constant aero = 0x940181a94A35A4569E4529A3CDfB74e38FD98631; + + /* OpenOcean */ + address public constant OORouter = 0x6352a56caadC4F1E25CD6c75970Fa768A3304e64; + + /* Aerodrome */ + address public constant voter = 0x16613524e02ad97eDfeF371bC883F2F5d6C480A5; + + /* Distribution */ + address public constant rewardManager = 0xC5ba10B609E8500c04884e1bcfc935B2c22654cd; + address public constant sonneTimelock = 0x5b22BD2fC485afe2DEAf1Ac9e2fAd316dDE163B0; + + function initialize() public initializer { + __AccessControl_init(); + + _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); + } + + /* Guarded Distribution Functions */ + function distributeReserves( + IMarket usdcMarket, + uint56 usdcAmount, + IMarket[] calldata markets, + uint256[] calldata amounts, + bytes[] calldata swapQuoteData, + OpPoolState calldata state + ) external onlyRole(DISTRIBUTOR_ROLE) { + require( + markets.length == amounts.length && markets.length == swapQuoteData.length, + 'ReserveManager: INVALID_INPUT' + ); + + reduceReserveInternal(usdcMarket, usdcAmount); + + for (uint256 i = 0; i < markets.length; i++) { + reduceReserveInternal(markets[i], amounts[i]); + address underlying = markets[i].underlying(); + swapToBaseInternal(underlying, amounts[i], swapQuoteData[i]); + } + + uint256 distAmount = usdc.myBalance(); + + usdc.safeApprove(rewardManager, distAmount); + BaseRewardManager(rewardManager).addRewards(distAmount, 0, state); + } + + function distributeAero(address pair, OpPoolState calldata state) external onlyRole(DISTRIBUTOR_ROLE) { + claimAeroInternal(pair); + + uint256 distAmount = aero.myBalance(); + + aero.safeApprove(rewardManager, distAmount); + BaseRewardManager(rewardManager).addRewards(0, distAmount, state); + } + + /* Guarded Aerodrome Management Function */ + function _stakeLP(address pair, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) { + if (amount == type(uint256).max) { + amount = pair.balanceOf(msg.sender); + } + + pair.safeTransferFrom(msg.sender, address(this), amount); + + stakeLPInternal(pair); + } + + function _unstakeLP(address pair, address to) public onlyRole(DEFAULT_ADMIN_ROLE) { + unstakeLPInternal(pair); + + uint256 amount = pair.myBalance(); + pair.safeTransfer(to, amount); + } + + /* Internal Market Management Functions */ + function reduceReserveInternal(IMarket market, uint256 amount) internal { + market.accrueInterest(); + + require(market.getCash() >= amount, 'ReserveManager: NOT_ENOUGH_CASH'); + require(market.totalReserves() >= amount, 'ReserveManager: NOT_ENOUGH_RESERVE'); + + ISonneTimelock(sonneTimelock)._reduceReserves(address(market), amount, address(this)); + } + + function swapToBaseInternal(address underlying, uint256 amount, bytes memory swapQuoteDatum) internal { + underlying.safeApprove(OORouter, amount); + + (bool success, bytes memory result) = OORouter.call{value: 0}(swapQuoteDatum); + require(success, 'ReserveManager: OO_API_SWAP_FAILED'); + } + + /* Internal Aerodrome Management Functions */ + function stakeLPInternal(address pair) internal { + address gauge = IVoter(voter).gauges(pair); + + uint256 amountPair = pair.myBalance(); + pair.safeApprove(gauge, amountPair); + IGauge(gauge).deposit(amountPair, 0); + } + + function unstakeLPInternal(address pair) internal { + address gauge = IVoter(voter).gauges(pair); + IGauge(gauge).withdrawAll(); + } + + function claimAeroInternal(address pair) internal { + address[] memory tokens = new address[](1); + tokens[0] = aero; + + address gauge = IVoter(voter).gauges(pair); + IGauge(gauge).getReward(address(this), tokens); + } +} diff --git a/contracts/BaseRewardManager.sol b/contracts/BaseRewardManager.sol index 1e47e8a..4b84d73 100644 --- a/contracts/BaseRewardManager.sol +++ b/contracts/BaseRewardManager.sol @@ -114,6 +114,13 @@ contract BaseRewardManager is AccessControlUpgradeable { } } + function setDelegator(address recipient, address delegator) public onlyRole(MANAGER_ROLE) { + sSonneDistributor.setDelegator(recipient, delegator); + uUsdcDistributor.setDelegator(recipient, delegator); + sAeroDistributor.setDelegator(recipient, delegator); + uAeroDistributor.setDelegator(recipient, delegator); + } + function pullTokenInternal(address token, uint256 amount) internal { if (amount == type(uint256).max) { amount = token.balanceOf(msg.sender); @@ -123,9 +130,8 @@ contract BaseRewardManager is AccessControlUpgradeable { } function swapUSDCtoSonneInternal(uint256 usdcAmount) internal { - IRouter.Route[] memory path = new IRouter.Route[](2); - path[0] = IRouter.Route({from: usdc, to: usdbc, stable: true, factory: address(0)}); - path[1] = IRouter.Route({from: usdbc, to: sonne, stable: false, factory: address(0)}); + IRouter.Route[] memory path = new IRouter.Route[](1); + path[0] = IRouter.Route({from: usdc, to: sonne, stable: false, factory: address(0)}); usdc.safeApprove(address(router), usdcAmount); router.swapExactTokensForTokens(usdcAmount, 0, path, address(this), block.timestamp); diff --git a/contracts/interfaces/SonneMerkleDistributorInterfaces.sol b/contracts/interfaces/SonneMerkleDistributorInterfaces.sol index 45e967c..eb9d51f 100644 --- a/contracts/interfaces/SonneMerkleDistributorInterfaces.sol +++ b/contracts/interfaces/SonneMerkleDistributorInterfaces.sol @@ -27,6 +27,8 @@ interface ISonneMerkleDistributor { uint256 totalStakedBalance ) external; + function setDelegator(address _recipient, address _delegator) external; + // For testing function grantRole(bytes32 role, address account) external; diff --git a/crosschain-rewards/.openzeppelin/unknown-8453.json b/crosschain-rewards/.openzeppelin/unknown-8453.json index 918bd69..2608a9c 100644 --- a/crosschain-rewards/.openzeppelin/unknown-8453.json +++ b/crosschain-rewards/.openzeppelin/unknown-8453.json @@ -270,6 +270,224 @@ } } } + }, + "d19edc677caed8fa880eb82ceaf36c36b4958d76f58e89709ad8c585542278ce": { + "address": "0x21fE76ca291207922132eA66E49fFB5bD10a43BD", + "txHash": "0xcda79a2c5772ea25e6c14c4fed0d0d5d49bebb9c635caedea65f0577ec161c75", + "layout": { + "solcVersion": "0.8.19", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "_status", + "offset": 0, + "slot": "1", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "2", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(RoleData)1331_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "rewardToken", + "offset": 0, + "slot": "201", + "type": "t_contract(IERC20)3664", + "contract": "SonneMerkleDistributor", + "src": "contracts/SonneMerkleDistributor.sol:32" + }, + { + "label": "rewards", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)dyn_storage", + "contract": "SonneMerkleDistributor", + "src": "contracts/SonneMerkleDistributor.sol:33" + }, + { + "label": "Rewards", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_uint256,t_struct(Reward)4453_storage)", + "contract": "SonneMerkleDistributor", + "src": "contracts/SonneMerkleDistributor.sol:35" + }, + { + "label": "delegatorAddresses", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_address)", + "contract": "SonneMerkleDistributor", + "src": "contracts/SonneMerkleDistributor.sol:36" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20)3664": { + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)1331_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Reward)4453_storage)": { + "label": "mapping(uint256 => struct SonneMerkleDistributor.Reward)", + "numberOfBytes": "32" + }, + "t_struct(Reward)4453_storage": { + "label": "struct SonneMerkleDistributor.Reward", + "members": [ + { + "label": "balance", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "merkleRoot", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "withdrawUnlockTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "ratio", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "leafClaimed", + "type": "t_mapping(t_bytes32,t_bool)", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_struct(RoleData)1331_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/crosschain-rewards/contracts/SonneMerkleDistributor.sol b/crosschain-rewards/contracts/SonneMerkleDistributor.sol index b3d83f8..1ee73d0 100644 --- a/crosschain-rewards/contracts/SonneMerkleDistributor.sol +++ b/crosschain-rewards/contracts/SonneMerkleDistributor.sol @@ -142,7 +142,7 @@ contract SonneMerkleDistributor is reward.balance = reward.balance - rewardAmount; //Send reward tokens to the recipient - rewardToken.safeTransfer(recipient, rewardAmount); + rewardToken.safeTransfer(msg.sender, rewardAmount); emit MerkleClaim(recipient, address(rewardToken), blockNumber, rewardAmount); } diff --git a/crosschain-rewards/deploy/01-distributor-instances.ts b/crosschain-rewards/deploy/01-distributor-instances.ts index 07883ba..fe8686d 100644 --- a/crosschain-rewards/deploy/01-distributor-instances.ts +++ b/crosschain-rewards/deploy/01-distributor-instances.ts @@ -5,6 +5,7 @@ import { upgrades } from 'hardhat'; import { deployBeaconProxy } from '../scripts/deploy-beacon-proxy'; const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + return false; const CONTRACT_NAME = 'contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor'; const deployments = { diff --git a/crosschain-rewards/deployments/base/SonneMerkleDistributor_Implementation.json b/crosschain-rewards/deployments/base/SonneMerkleDistributor_Implementation.json index a166715..74ba27e 100644 --- a/crosschain-rewards/deployments/base/SonneMerkleDistributor_Implementation.json +++ b/crosschain-rewards/deployments/base/SonneMerkleDistributor_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x41680c3b0e5Ac10960B389C38f98aCE3dd450F42", + "address": "0x21fE76ca291207922132eA66E49fFB5bD10a43BD", "abi": [ { "anonymous": false, @@ -570,11 +570,11 @@ "type": "function" } ], - "numDeployments": 1, - "solcInputHash": "7a37e63c2c2109222005519c9241203b", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNr\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"MerkleClaim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"funder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNr\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"withdrawal\",\"type\":\"bool\"}],\"name\":\"MerkleFundUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNr\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawUnlockTime\",\"type\":\"uint256\"}],\"name\":\"NewMerkle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNDS_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MANAGER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"Rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"withdrawUnlockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawUnlockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalStakedBalance\",\"type\":\"uint256\"}],\"name\":\"addReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"proof\",\"type\":\"bytes[]\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegatorAddresses\",\"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\":\"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\":\"contract IERC20\",\"name\":\"_rewardToken\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes[]\",\"name\":\"proof\",\"type\":\"bytes[]\"}],\"name\":\"isClaimable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_delegator\",\"type\":\"address\"}],\"name\":\"setDelegator\",\"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\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"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\":{\"addReward(uint256,bytes32,uint256,uint256,uint256)\":{\"params\":{\"amount\":\"The amount of reward tokens to deposit\",\"blockNumber\":\"The block number for the Reward\",\"merkleRoot\":\"The merkle root of the distribution tree\",\"totalStakedBalance\":\"Total staked balance of the merkleRoot (computed off-chain)\",\"withdrawUnlockTime\":\"The timestamp after which withdrawals by owner are allowed\"}},\"claim(uint256,bytes[])\":{\"details\":\"Checks proofs and claims tracking before transferring rewardTokens\",\"params\":{\"blockNumber\":\"The block number for the Reward\",\"proof\":\"The merkle proof for the claim\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address)\":{\"params\":{\"_rewardToken\":\"The reward token to be distributed\"}},\"isClaimable(uint256,address,bytes[])\":{\"params\":{\"account\":\"The address of the account claiming\",\"blockNumber\":\"The block number for the Reward\",\"proof\":\"The merkle proof for the claim\"},\"returns\":{\"_0\":\"A bool indicating if the claim is valid and claimable\"}},\"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.\"},\"setDelegator(address,address)\":{\"params\":{\"_delegator\":\"The address that sould claim on behalf of the owner\",\"_recipient\":\"original eligible recipient address\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdrawFunds(uint256,uint256)\":{\"params\":{\"amount\":\"The amount to withdraw\",\"blockNumber\":\"The block number for the Reward\"}}},\"title\":\"Sonne Finance Merkle tree-based rewards distributor\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addReward(uint256,bytes32,uint256,uint256,uint256)\":{\"notice\":\"Creates a new Reward struct for a rewards distribution\"},\"claim(uint256,bytes[])\":{\"notice\":\"Claims the specified amount for an account if valid\"},\"initialize(address)\":{\"notice\":\"Contract constructor to initialize rewardToken\"},\"isClaimable(uint256,address,bytes[])\":{\"notice\":\"Checks if a claim is valid and claimable\"},\"setDelegator(address,address)\":{\"notice\":\"Sets a delegator address for a given recipient\"},\"withdrawFunds(uint256,uint256)\":{\"notice\":\"Allows to withdraw available funds to owner after unlock time\"}},\"notice\":\"Contract to distribute rewards on BASE network to Sonne Finance Optimism stakers\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SonneMerkleDistributor.sol\":\"SonneMerkleDistributor\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@eth-optimism/contracts-bedrock/contracts/libraries/Bytes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @title Bytes\\n/// @notice Bytes is a library for manipulating byte arrays.\\nlibrary Bytes {\\n /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils\\n /// @notice Slices a byte array with a given starting index and length. Returns a new byte array\\n /// as opposed to a pointer to the original array. Will throw if trying to slice more\\n /// bytes than exist in the array.\\n /// @param _bytes Byte array to slice.\\n /// @param _start Starting index of the slice.\\n /// @param _length Length of the slice.\\n /// @return Slice of the input byte array.\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n ) internal pure returns (bytes memory) {\\n unchecked {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_start + _length >= _start, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n }\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n /// @notice Slices a byte array with a given starting index up to the end of the original byte\\n /// array. Returns a new array rathern than a pointer to the original.\\n /// @param _bytes Byte array to slice.\\n /// @param _start Starting index of the slice.\\n /// @return Slice of the input byte array.\\n function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\\n if (_start >= _bytes.length) {\\n return bytes(\\\"\\\");\\n }\\n return slice(_bytes, _start, _bytes.length - _start);\\n }\\n\\n /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles.\\n /// Resulting nibble array will be exactly twice as long as the input byte array.\\n /// @param _bytes Input byte array to convert.\\n /// @return Resulting nibble array.\\n function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\\n bytes memory _nibbles;\\n assembly {\\n // Grab a free memory offset for the new array\\n _nibbles := mload(0x40)\\n\\n // Load the length of the passed bytes array from memory\\n let bytesLength := mload(_bytes)\\n\\n // Calculate the length of the new nibble array\\n // This is the length of the input array times 2\\n let nibblesLength := shl(0x01, bytesLength)\\n\\n // Update the free memory pointer to allocate memory for the new array.\\n // To do this, we add the length of the new array + 32 bytes for the array length\\n // rounded up to the nearest 32 byte boundary to the current free memory pointer.\\n mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F))))\\n\\n // Store the length of the new array in memory\\n mstore(_nibbles, nibblesLength)\\n\\n // Store the memory offset of the _bytes array's contents on the stack\\n let bytesStart := add(_bytes, 0x20)\\n\\n // Store the memory offset of the nibbles array's contents on the stack\\n let nibblesStart := add(_nibbles, 0x20)\\n\\n // Loop through each byte in the input array\\n for {\\n let i := 0x00\\n } lt(i, bytesLength) {\\n i := add(i, 0x01)\\n } {\\n // Get the starting offset of the next 2 bytes in the nibbles array\\n let offset := add(nibblesStart, shl(0x01, i))\\n // Load the byte at the current index within the `_bytes` array\\n let b := byte(0x00, mload(add(bytesStart, i)))\\n\\n // Pull out the first nibble and store it in the new array\\n mstore8(offset, shr(0x04, b))\\n // Pull out the second nibble and store it in the new array\\n mstore8(add(offset, 0x01), and(b, 0x0F))\\n }\\n }\\n return _nibbles;\\n }\\n\\n /// @notice Compares two byte arrays by comparing their keccak256 hashes.\\n /// @param _bytes First byte array to compare.\\n /// @param _other Second byte array to compare.\\n /// @return True if the two byte arrays are equal, false otherwise.\\n function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\\n return keccak256(_bytes) == keccak256(_other);\\n }\\n}\\n\",\"keccak256\":\"0x6fa7ba368cfee95b16b177c92745583736ad623befb81c8ae98ce020e670ce44\",\"license\":\"MIT\"},\"@eth-optimism/contracts-bedrock/contracts/libraries/rlp/RLPReader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.8;\\n\\n/**\\n * @custom:attribution https://github.com/hamdiallam/Solidity-RLP\\n * @title RLPReader\\n * @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted\\n * from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with\\n * various tweaks to improve readability.\\n */\\nlibrary RLPReader {\\n /**\\n * Custom pointer type to avoid confusion between pointers and uint256s.\\n */\\n type MemoryPointer is uint256;\\n\\n /**\\n * @notice RLP item types.\\n *\\n * @custom:value DATA_ITEM Represents an RLP data item (NOT a list).\\n * @custom:value LIST_ITEM Represents an RLP list item.\\n */\\n enum RLPItemType {\\n DATA_ITEM,\\n LIST_ITEM\\n }\\n\\n /**\\n * @notice Struct representing an RLP item.\\n *\\n * @custom:field length Length of the RLP item.\\n * @custom:field ptr Pointer to the RLP item in memory.\\n */\\n struct RLPItem {\\n uint256 length;\\n MemoryPointer ptr;\\n }\\n\\n /**\\n * @notice Max list length that this library will accept.\\n */\\n uint256 internal constant MAX_LIST_LENGTH = 32;\\n\\n /**\\n * @notice Converts bytes to a reference to memory position and length.\\n *\\n * @param _in Input bytes to convert.\\n *\\n * @return Output memory reference.\\n */\\n function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory) {\\n // Empty arrays are not RLP items.\\n require(\\n _in.length > 0,\\n \\\"RLPReader: length of an RLP item must be greater than zero to be decodable\\\"\\n );\\n\\n MemoryPointer ptr;\\n assembly {\\n ptr := add(_in, 32)\\n }\\n\\n return RLPItem({ length: _in.length, ptr: ptr });\\n }\\n\\n /**\\n * @notice Reads an RLP list value into a list of RLP items.\\n *\\n * @param _in RLP list value.\\n *\\n * @return Decoded RLP list items.\\n */\\n function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory) {\\n (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.LIST_ITEM,\\n \\\"RLPReader: decoded item type for list is not a list item\\\"\\n );\\n\\n require(\\n listOffset + listLength == _in.length,\\n \\\"RLPReader: list item has an invalid data remainder\\\"\\n );\\n\\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\\n // writing to the length. Since we can't know the number of RLP items without looping over\\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\\n // simply set a reasonable maximum list length and decrease the size before we finish.\\n RLPItem[] memory out = new RLPItem[](MAX_LIST_LENGTH);\\n\\n uint256 itemCount = 0;\\n uint256 offset = listOffset;\\n while (offset < _in.length) {\\n (uint256 itemOffset, uint256 itemLength, ) = _decodeLength(\\n RLPItem({\\n length: _in.length - offset,\\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\\n })\\n );\\n\\n // We don't need to check itemCount < out.length explicitly because Solidity already\\n // handles this check on our behalf, we'd just be wasting gas.\\n out[itemCount] = RLPItem({\\n length: itemLength + itemOffset,\\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\\n });\\n\\n itemCount += 1;\\n offset += itemOffset + itemLength;\\n }\\n\\n // Decrease the array size to match the actual item count.\\n assembly {\\n mstore(out, itemCount)\\n }\\n\\n return out;\\n }\\n\\n /**\\n * @notice Reads an RLP list value into a list of RLP items.\\n *\\n * @param _in RLP list value.\\n *\\n * @return Decoded RLP list items.\\n */\\n function readList(bytes memory _in) internal pure returns (RLPItem[] memory) {\\n return readList(toRLPItem(_in));\\n }\\n\\n /**\\n * @notice Reads an RLP bytes value into bytes.\\n *\\n * @param _in RLP bytes value.\\n *\\n * @return Decoded bytes.\\n */\\n function readBytes(RLPItem memory _in) internal pure returns (bytes memory) {\\n (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.DATA_ITEM,\\n \\\"RLPReader: decoded item type for bytes is not a data item\\\"\\n );\\n\\n require(\\n _in.length == itemOffset + itemLength,\\n \\\"RLPReader: bytes value contains an invalid remainder\\\"\\n );\\n\\n return _copy(_in.ptr, itemOffset, itemLength);\\n }\\n\\n /**\\n * @notice Reads an RLP bytes value into bytes.\\n *\\n * @param _in RLP bytes value.\\n *\\n * @return Decoded bytes.\\n */\\n function readBytes(bytes memory _in) internal pure returns (bytes memory) {\\n return readBytes(toRLPItem(_in));\\n }\\n\\n /**\\n * @notice Reads the raw bytes of an RLP item.\\n *\\n * @param _in RLP item to read.\\n *\\n * @return Raw RLP bytes.\\n */\\n function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory) {\\n return _copy(_in.ptr, 0, _in.length);\\n }\\n\\n /**\\n * @notice Decodes the length of an RLP item.\\n *\\n * @param _in RLP item to decode.\\n *\\n * @return Offset of the encoded data.\\n * @return Length of the encoded data.\\n * @return RLP item type (LIST_ITEM or DATA_ITEM).\\n */\\n function _decodeLength(RLPItem memory _in)\\n private\\n pure\\n returns (\\n uint256,\\n uint256,\\n RLPItemType\\n )\\n {\\n // Short-circuit if there's nothing to decode, note that we perform this check when\\n // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass\\n // that function and create an RLP item directly. So we need to check this anyway.\\n require(\\n _in.length > 0,\\n \\\"RLPReader: length of an RLP item must be greater than zero to be decodable\\\"\\n );\\n\\n MemoryPointer ptr = _in.ptr;\\n uint256 prefix;\\n assembly {\\n prefix := byte(0, mload(ptr))\\n }\\n\\n if (prefix <= 0x7f) {\\n // Single byte.\\n return (0, 1, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xb7) {\\n // Short string.\\n\\n // slither-disable-next-line variable-scope\\n uint256 strLen = prefix - 0x80;\\n\\n require(\\n _in.length > strLen,\\n \\\"RLPReader: length of content must be greater than string length (short string)\\\"\\n );\\n\\n bytes1 firstByteOfContent;\\n assembly {\\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\\n }\\n\\n require(\\n strLen != 1 || firstByteOfContent >= 0x80,\\n \\\"RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)\\\"\\n );\\n\\n return (1, strLen, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xbf) {\\n // Long string.\\n uint256 lenOfStrLen = prefix - 0xb7;\\n\\n require(\\n _in.length > lenOfStrLen,\\n \\\"RLPReader: length of content must be > than length of string length (long string)\\\"\\n );\\n\\n bytes1 firstByteOfContent;\\n assembly {\\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\\n }\\n\\n require(\\n firstByteOfContent != 0x00,\\n \\\"RLPReader: length of content must not have any leading zeros (long string)\\\"\\n );\\n\\n uint256 strLen;\\n assembly {\\n strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1)))\\n }\\n\\n require(\\n strLen > 55,\\n \\\"RLPReader: length of content must be greater than 55 bytes (long string)\\\"\\n );\\n\\n require(\\n _in.length > lenOfStrLen + strLen,\\n \\\"RLPReader: length of content must be greater than total length (long string)\\\"\\n );\\n\\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xf7) {\\n // Short list.\\n // slither-disable-next-line variable-scope\\n uint256 listLen = prefix - 0xc0;\\n\\n require(\\n _in.length > listLen,\\n \\\"RLPReader: length of content must be greater than list length (short list)\\\"\\n );\\n\\n return (1, listLen, RLPItemType.LIST_ITEM);\\n } else {\\n // Long list.\\n uint256 lenOfListLen = prefix - 0xf7;\\n\\n require(\\n _in.length > lenOfListLen,\\n \\\"RLPReader: length of content must be > than length of list length (long list)\\\"\\n );\\n\\n bytes1 firstByteOfContent;\\n assembly {\\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\\n }\\n\\n require(\\n firstByteOfContent != 0x00,\\n \\\"RLPReader: length of content must not have any leading zeros (long list)\\\"\\n );\\n\\n uint256 listLen;\\n assembly {\\n listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1)))\\n }\\n\\n require(\\n listLen > 55,\\n \\\"RLPReader: length of content must be greater than 55 bytes (long list)\\\"\\n );\\n\\n require(\\n _in.length > lenOfListLen + listLen,\\n \\\"RLPReader: length of content must be greater than total length (long list)\\\"\\n );\\n\\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\\n }\\n }\\n\\n /**\\n * @notice Copies the bytes from a memory location.\\n *\\n * @param _src Pointer to the location to read from.\\n * @param _offset Offset to start reading from.\\n * @param _length Number of bytes to read.\\n *\\n * @return Copied bytes.\\n */\\n function _copy(\\n MemoryPointer _src,\\n uint256 _offset,\\n uint256 _length\\n ) private pure returns (bytes memory) {\\n bytes memory out = new bytes(_length);\\n if (_length == 0) {\\n return out;\\n }\\n\\n // Mostly based on Solidity's copy_memory_to_memory:\\n // solhint-disable max-line-length\\n // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114\\n uint256 src = MemoryPointer.unwrap(_src) + _offset;\\n assembly {\\n let dest := add(out, 32)\\n let i := 0\\n for {\\n\\n } lt(i, _length) {\\n i := add(i, 32)\\n } {\\n mstore(add(dest, i), mload(add(src, i)))\\n }\\n\\n if gt(i, _length) {\\n mstore(add(dest, _length), 0)\\n }\\n }\\n\\n return out;\\n }\\n}\\n\",\"keccak256\":\"0x50763c897f0fe84cb067985ec4d7c5721ce9004a69cf0327f96f8982ee8ca412\",\"license\":\"MIT\"},\"@eth-optimism/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Bytes } from \\\"../Bytes.sol\\\";\\nimport { RLPReader } from \\\"../rlp/RLPReader.sol\\\";\\n\\n/**\\n * @title MerkleTrie\\n * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie\\n * inclusion proofs. By default, this library assumes a hexary trie. One can change the\\n * trie radix constant to support other trie radixes.\\n */\\nlibrary MerkleTrie {\\n /**\\n * @notice Struct representing a node in the trie.\\n *\\n * @custom:field encoded The RLP-encoded node.\\n * @custom:field decoded The RLP-decoded node.\\n */\\n struct TrieNode {\\n bytes encoded;\\n RLPReader.RLPItem[] decoded;\\n }\\n\\n /**\\n * @notice Determines the number of elements per branch node.\\n */\\n uint256 internal constant TREE_RADIX = 16;\\n\\n /**\\n * @notice Branch nodes have TREE_RADIX elements and one value element.\\n */\\n uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;\\n\\n /**\\n * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`.\\n */\\n uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;\\n\\n /**\\n * @notice Prefix for even-nibbled extension node paths.\\n */\\n uint8 internal constant PREFIX_EXTENSION_EVEN = 0;\\n\\n /**\\n * @notice Prefix for odd-nibbled extension node paths.\\n */\\n uint8 internal constant PREFIX_EXTENSION_ODD = 1;\\n\\n /**\\n * @notice Prefix for even-nibbled leaf node paths.\\n */\\n uint8 internal constant PREFIX_LEAF_EVEN = 2;\\n\\n /**\\n * @notice Prefix for odd-nibbled leaf node paths.\\n */\\n uint8 internal constant PREFIX_LEAF_ODD = 3;\\n\\n /**\\n * @notice Verifies a proof that a given key/value pair is present in the trie.\\n *\\n * @param _key Key of the node to search for, as a hex string.\\n * @param _value Value of the node to search for, as a hex string.\\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\\n * nodes that make a path down to the target node.\\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\\n * correctly constructed.\\n *\\n * @return Whether or not the proof is valid.\\n */\\n function verifyInclusionProof(\\n bytes memory _key,\\n bytes memory _value,\\n bytes[] memory _proof,\\n bytes32 _root\\n ) internal pure returns (bool) {\\n return Bytes.equal(_value, get(_key, _proof, _root));\\n }\\n\\n /**\\n * @notice Retrieves the value associated with a given key.\\n *\\n * @param _key Key to search for, as hex bytes.\\n * @param _proof Merkle trie inclusion proof for the key.\\n * @param _root Known root of the Merkle trie.\\n *\\n * @return Value of the key if it exists.\\n */\\n function get(\\n bytes memory _key,\\n bytes[] memory _proof,\\n bytes32 _root\\n ) internal pure returns (bytes memory) {\\n require(_key.length > 0, \\\"MerkleTrie: empty key\\\");\\n\\n TrieNode[] memory proof = _parseProof(_proof);\\n bytes memory key = Bytes.toNibbles(_key);\\n bytes memory currentNodeID = abi.encodePacked(_root);\\n uint256 currentKeyIndex = 0;\\n\\n // Proof is top-down, so we start at the first element (root).\\n for (uint256 i = 0; i < proof.length; i++) {\\n TrieNode memory currentNode = proof[i];\\n\\n // Key index should never exceed total key length or we'll be out of bounds.\\n require(\\n currentKeyIndex <= key.length,\\n \\\"MerkleTrie: key index exceeds total key length\\\"\\n );\\n\\n if (currentKeyIndex == 0) {\\n // First proof element is always the root node.\\n require(\\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\\n \\\"MerkleTrie: invalid root hash\\\"\\n );\\n } else if (currentNode.encoded.length >= 32) {\\n // Nodes 32 bytes or larger are hashed inside branch nodes.\\n require(\\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\\n \\\"MerkleTrie: invalid large internal hash\\\"\\n );\\n } else {\\n // Nodes smaller than 32 bytes aren't hashed.\\n require(\\n Bytes.equal(currentNode.encoded, currentNodeID),\\n \\\"MerkleTrie: invalid internal node hash\\\"\\n );\\n }\\n\\n if (currentNode.decoded.length == BRANCH_NODE_LENGTH) {\\n if (currentKeyIndex == key.length) {\\n // Value is the last element of the decoded list (for branch nodes). There's\\n // some ambiguity in the Merkle trie specification because bytes(0) is a\\n // valid value to place into the trie, but for branch nodes bytes(0) can exist\\n // even when the value wasn't explicitly placed there. Geth treats a value of\\n // bytes(0) as \\\"key does not exist\\\" and so we do the same.\\n bytes memory value = RLPReader.readBytes(currentNode.decoded[TREE_RADIX]);\\n require(\\n value.length > 0,\\n \\\"MerkleTrie: value length must be greater than zero (branch)\\\"\\n );\\n\\n // Extra proof elements are not allowed.\\n require(\\n i == proof.length - 1,\\n \\\"MerkleTrie: value node must be last node in proof (branch)\\\"\\n );\\n\\n return value;\\n } else {\\n // We're not at the end of the key yet.\\n // Figure out what the next node ID should be and continue.\\n uint8 branchKey = uint8(key[currentKeyIndex]);\\n RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];\\n currentNodeID = _getNodeID(nextNode);\\n currentKeyIndex += 1;\\n }\\n } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {\\n bytes memory path = _getNodePath(currentNode);\\n uint8 prefix = uint8(path[0]);\\n uint8 offset = 2 - (prefix % 2);\\n bytes memory pathRemainder = Bytes.slice(path, offset);\\n bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex);\\n uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);\\n\\n // Whether this is a leaf node or an extension node, the path remainder MUST be a\\n // prefix of the key remainder (or be equal to the key remainder) or the proof is\\n // considered invalid.\\n require(\\n pathRemainder.length == sharedNibbleLength,\\n \\\"MerkleTrie: path remainder must share all nibbles with key\\\"\\n );\\n\\n if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {\\n // Prefix of 2 or 3 means this is a leaf node. For the leaf node to be valid,\\n // the key remainder must be exactly equal to the path remainder. We already\\n // did the necessary byte comparison, so it's more efficient here to check that\\n // the key remainder length equals the shared nibble length, which implies\\n // equality with the path remainder (since we already did the same check with\\n // the path remainder and the shared nibble length).\\n require(\\n keyRemainder.length == sharedNibbleLength,\\n \\\"MerkleTrie: key remainder must be identical to path remainder\\\"\\n );\\n\\n // Our Merkle Trie is designed specifically for the purposes of the Ethereum\\n // state trie. Empty values are not allowed in the state trie, so we can safely\\n // say that if the value is empty, the key should not exist and the proof is\\n // invalid.\\n bytes memory value = RLPReader.readBytes(currentNode.decoded[1]);\\n require(\\n value.length > 0,\\n \\\"MerkleTrie: value length must be greater than zero (leaf)\\\"\\n );\\n\\n // Extra proof elements are not allowed.\\n require(\\n i == proof.length - 1,\\n \\\"MerkleTrie: value node must be last node in proof (leaf)\\\"\\n );\\n\\n return value;\\n } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {\\n // Prefix of 0 or 1 means this is an extension node. We move onto the next node\\n // in the proof and increment the key index by the length of the path remainder\\n // which is equal to the shared nibble length.\\n currentNodeID = _getNodeID(currentNode.decoded[1]);\\n currentKeyIndex += sharedNibbleLength;\\n } else {\\n revert(\\\"MerkleTrie: received a node with an unknown prefix\\\");\\n }\\n } else {\\n revert(\\\"MerkleTrie: received an unparseable node\\\");\\n }\\n }\\n\\n revert(\\\"MerkleTrie: ran out of proof elements\\\");\\n }\\n\\n /**\\n * @notice Parses an array of proof elements into a new array that contains both the original\\n * encoded element and the RLP-decoded element.\\n *\\n * @param _proof Array of proof elements to parse.\\n *\\n * @return Proof parsed into easily accessible structs.\\n */\\n function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) {\\n uint256 length = _proof.length;\\n TrieNode[] memory proof = new TrieNode[](length);\\n for (uint256 i = 0; i < length; ) {\\n proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) });\\n unchecked {\\n ++i;\\n }\\n }\\n return proof;\\n }\\n\\n /**\\n * @notice Picks out the ID for a node. Node ID is referred to as the \\\"hash\\\" within the\\n * specification, but nodes < 32 bytes are not actually hashed.\\n *\\n * @param _node Node to pull an ID for.\\n *\\n * @return ID for the node, depending on the size of its contents.\\n */\\n function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) {\\n return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node);\\n }\\n\\n /**\\n * @notice Gets the path for a leaf or extension node.\\n *\\n * @param _node Node to get a path for.\\n *\\n * @return Node path, converted to an array of nibbles.\\n */\\n function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) {\\n return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0]));\\n }\\n\\n /**\\n * @notice Utility; determines the number of nibbles shared between two nibble arrays.\\n *\\n * @param _a First nibble array.\\n * @param _b Second nibble array.\\n *\\n * @return Number of shared nibbles.\\n */\\n function _getSharedNibbleLength(bytes memory _a, bytes memory _b)\\n private\\n pure\\n returns (uint256)\\n {\\n uint256 shared;\\n uint256 max = (_a.length < _b.length) ? _a.length : _b.length;\\n for (; shared < max && _a[shared] == _b[shared]; ) {\\n unchecked {\\n ++shared;\\n }\\n }\\n return shared;\\n }\\n}\\n\",\"keccak256\":\"0xd27fc945d6dd2821636d840f3766f817823c8e9fbfdb87c2da7c73e4292d2f7f\",\"license\":\"MIT\"},\"@eth-optimism/contracts-bedrock/contracts/libraries/trie/SecureMerkleTrie.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/* Library Imports */\\nimport { MerkleTrie } from \\\"./MerkleTrie.sol\\\";\\n\\n/**\\n * @title SecureMerkleTrie\\n * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input\\n * keys. Ethereum's state trie hashes input keys before storing them.\\n */\\nlibrary SecureMerkleTrie {\\n /**\\n * @notice Verifies a proof that a given key/value pair is present in the Merkle trie.\\n *\\n * @param _key Key of the node to search for, as a hex string.\\n * @param _value Value of the node to search for, as a hex string.\\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\\n * nodes that make a path down to the target node.\\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\\n * correctly constructed.\\n *\\n * @return Whether or not the proof is valid.\\n */\\n function verifyInclusionProof(\\n bytes memory _key,\\n bytes memory _value,\\n bytes[] memory _proof,\\n bytes32 _root\\n ) internal pure returns (bool) {\\n bytes memory key = _getSecureKey(_key);\\n return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);\\n }\\n\\n /**\\n * @notice Retrieves the value associated with a given key.\\n *\\n * @param _key Key to search for, as hex bytes.\\n * @param _proof Merkle trie inclusion proof for the key.\\n * @param _root Known root of the Merkle trie.\\n *\\n * @return Value of the key if it exists.\\n */\\n function get(\\n bytes memory _key,\\n bytes[] memory _proof,\\n bytes32 _root\\n ) internal pure returns (bytes memory) {\\n bytes memory key = _getSecureKey(_key);\\n return MerkleTrie.get(key, _proof, _root);\\n }\\n\\n /**\\n * @notice Computes the hashed version of the input key.\\n *\\n * @param _key Key to hash.\\n *\\n * @return Hashed version of the key.\\n */\\n function _getSecureKey(bytes memory _key) private pure returns (bytes memory) {\\n return abi.encodePacked(keccak256(_key));\\n }\\n}\\n\",\"keccak256\":\"0x61b03a03779cb1f75cea3b88af16fdfd10629029b4b2d6be5238e71af8ef1b5f\",\"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/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/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/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.3) (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. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(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\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"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\"},\"contracts/SonneMerkleDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\\nimport '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport {SecureMerkleTrie} from '@eth-optimism/contracts-bedrock/contracts/libraries/trie/SecureMerkleTrie.sol';\\nimport {RLPReader} from '@eth-optimism/contracts-bedrock/contracts/libraries/rlp/RLPReader.sol';\\nimport {ISonneMerkleDistributor} from './interfaces/ISonneMerkleDistributor.sol';\\n\\n/// @title Sonne Finance Merkle tree-based rewards distributor\\n/// @notice Contract to distribute rewards on BASE network to Sonne Finance Optimism stakers\\ncontract SonneMerkleDistributor is\\n Initializable,\\n ReentrancyGuardUpgradeable,\\n AccessControlUpgradeable,\\n ISonneMerkleDistributor\\n{\\n using SafeERC20 for IERC20;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE');\\n bytes32 public constant FUNDS_ROLE = keccak256('FUNDS_ROLE');\\n\\n struct Reward {\\n uint256 balance; // amount of reward tokens held in this reward\\n bytes32 merkleRoot; // root of claims merkle tree\\n uint256 withdrawUnlockTime; // time after which owner can withdraw remaining rewards\\n uint256 ratio; // ratio of rewards to be distributed per one staked token on OP\\n mapping(bytes32 => bool) leafClaimed; // mapping of leafes that already claimed\\n }\\n\\n IERC20 public rewardToken;\\n uint256[] public rewards; // a list of all rewards\\n\\n mapping(uint256 => Reward) public Rewards; // mapping between blockNumber => Reward\\n mapping(address => address) public delegatorAddresses;\\n\\n /// mapping to allow msg.sender to claim on behalf of a delegators address\\n\\n /// @notice Contract constructor to initialize rewardToken\\n /// @param _rewardToken The reward token to be distributed\\n function initialize(IERC20 _rewardToken) external initializer {\\n __ReentrancyGuard_init();\\n __AccessControl_init();\\n\\n require(address(_rewardToken) != address(0), 'Token cannot be zero');\\n rewardToken = _rewardToken;\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _grantRole(MANAGER_ROLE, msg.sender);\\n _grantRole(FUNDS_ROLE, msg.sender);\\n }\\n\\n /// @notice Sets a delegator address for a given recipient\\n /// @param _recipient original eligible recipient address\\n /// @param _delegator The address that sould claim on behalf of the owner\\n function setDelegator(address _recipient, address _delegator) external onlyRole(MANAGER_ROLE) {\\n require(_recipient != address(0) && _delegator != address(0), 'Invalid address provided');\\n delegatorAddresses[_delegator] = _recipient;\\n }\\n\\n /// @notice Creates a new Reward struct for a rewards distribution\\n /// @param amount The amount of reward tokens to deposit\\n /// @param merkleRoot The merkle root of the distribution tree\\n /// @param blockNumber The block number for the Reward\\n /// @param withdrawUnlockTime The timestamp after which withdrawals by owner are allowed\\n /// @param totalStakedBalance Total staked balance of the merkleRoot (computed off-chain)\\n function addReward(\\n uint256 amount,\\n bytes32 merkleRoot,\\n uint256 blockNumber,\\n uint256 withdrawUnlockTime,\\n uint256 totalStakedBalance\\n ) external onlyRole(MANAGER_ROLE) {\\n require(merkleRoot != bytes32(0), 'Merkle root cannot be zero');\\n\\n // creates a new reward struct tied to the blocknumber the merkleProof was created at\\n Reward storage reward = Rewards[blockNumber];\\n\\n require(reward.merkleRoot == bytes32(0), 'Merkle root was already posted');\\n uint256 balance = rewardToken.balanceOf(msg.sender);\\n require(amount > 0 && amount <= balance, 'Invalid amount or insufficient balance');\\n\\n // transfer rewardToken from the distributor to the contract\\n rewardToken.safeTransferFrom(msg.sender, address(this), amount);\\n\\n // record Reward in stable storage\\n reward.balance = amount;\\n reward.merkleRoot = merkleRoot;\\n reward.withdrawUnlockTime = withdrawUnlockTime;\\n reward.ratio = (amount * 1e36) / (totalStakedBalance);\\n rewards.push(blockNumber);\\n emit NewMerkle(msg.sender, address(rewardToken), amount, merkleRoot, blockNumber, withdrawUnlockTime);\\n }\\n\\n /// @notice Allows to withdraw available funds to owner after unlock time\\n /// @param blockNumber The block number for the Reward\\n /// @param amount The amount to withdraw\\n function withdrawFunds(uint256 blockNumber, uint256 amount) external onlyRole(FUNDS_ROLE) {\\n Reward storage reward = Rewards[blockNumber];\\n require(block.timestamp >= reward.withdrawUnlockTime, 'Rewards may not be withdrawn');\\n require(amount <= reward.balance, 'Insufficient balance');\\n\\n // update Rewards record\\n reward.balance = reward.balance -= amount;\\n\\n // transfer rewardToken back to owner\\n rewardToken.safeTransfer(msg.sender, amount);\\n emit MerkleFundUpdate(msg.sender, reward.merkleRoot, blockNumber, amount, true);\\n }\\n\\n /// @notice Claims the specified amount for an account if valid\\n /// @dev Checks proofs and claims tracking before transferring rewardTokens\\n /// @param blockNumber The block number for the Reward\\n /// @param proof The merkle proof for the claim\\n function claim(uint256 blockNumber, bytes[] calldata proof) external nonReentrant {\\n Reward storage reward = Rewards[blockNumber];\\n require(reward.merkleRoot != bytes32(0), 'Reward not found');\\n\\n // Check if the delegatorAddresses includes the account\\n // The delegatorAddresses mapping allows for an account to delegate its claim ability to another address\\n // This can be useful in scenarios where the target recipient might not have the ability to directly interact\\n // with the BASE network contract (e.g. a smart contract with a different address)\\n address recipient = delegatorAddresses[msg.sender] != address(0) ? delegatorAddresses[msg.sender] : msg.sender;\\n\\n // Assuming slotNr is 2 as per your previous function\\n bytes32 key = keccak256(abi.encode(recipient, uint256(2)));\\n\\n //Get the amount of the key from the merkel tree\\n uint256 amount = _getValueFromMerkleTree(reward.merkleRoot, key, proof);\\n\\n // calculate the reward based on the ratio\\n uint256 rewardAmount = (amount * reward.ratio) / 1e36; // TODO check if there is a loss of precision possible here\\n\\n require(reward.balance >= rewardAmount, 'Claim under-funded by funder.');\\n require(Rewards[blockNumber].leafClaimed[key] == false, 'Already claimed');\\n\\n // marks the leaf as claimed\\n reward.leafClaimed[key] = true;\\n\\n // Subtract the rewardAmount, not the amount\\n reward.balance = reward.balance - rewardAmount;\\n\\n //Send reward tokens to the recipient\\n rewardToken.safeTransfer(recipient, rewardAmount);\\n\\n emit MerkleClaim(recipient, address(rewardToken), blockNumber, rewardAmount);\\n }\\n\\n /// @notice Checks if a claim is valid and claimable\\n /// @param blockNumber The block number for the Reward\\n /// @param account The address of the account claiming\\n /// @param proof The merkle proof for the claim\\n /// @return A bool indicating if the claim is valid and claimable\\n function isClaimable(uint256 blockNumber, address account, bytes[] calldata proof) external view returns (bool) {\\n bytes32 merkleRoot = Rewards[blockNumber].merkleRoot;\\n\\n // At the staking contract, the balances are stored in a mapping (address => uint256) at storage slot 2\\n bytes32 leaf = keccak256(abi.encode(account, uint256(2)));\\n\\n if (merkleRoot == 0) return false;\\n return !Rewards[blockNumber].leafClaimed[leaf] && _getValueFromMerkleTree(merkleRoot, leaf, proof) > 0;\\n }\\n\\n /// @dev Uses SecureMerkleTrie Library to extract the value from the Merkle proof provided by the user\\n /// @param merkleRoot the merkle root\\n /// @param key the key of the leaf => keccak256(address,2)\\n /// @return result The converted uint256 value as stored in the slot on OP\\n function _getValueFromMerkleTree(\\n bytes32 merkleRoot,\\n bytes32 key,\\n bytes[] calldata proof\\n ) internal pure returns (uint256 result) {\\n // Uses SecureMerkleTrie Library to extract the value from the Merkle proof provided by the user\\n // Reverts if Merkle proof verification fails\\n bytes memory data = RLPReader.readBytes(SecureMerkleTrie.get(abi.encodePacked(key), proof, merkleRoot));\\n\\n for (uint256 i = 0; i < data.length; i++) {\\n result = result * 256 + uint8(data[i]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xebc351e83a4f51eef7afa26e1ceecada1bb0cd065d718e27f3ae9bfeb47f1be0\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/ISonneMerkleDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface ISonneMerkleDistributor {\\n event NewMerkle(\\n address indexed creator,\\n address indexed rewardToken,\\n uint256 amount,\\n bytes32 indexed merkleRoot,\\n uint256 blockNr,\\n uint256 withdrawUnlockTime\\n );\\n event MerkleFundUpdate(\\n address indexed funder,\\n bytes32 indexed merkleRoot,\\n uint256 blockNr,\\n uint256 amount,\\n bool withdrawal\\n );\\n event MerkleClaim(address indexed claimer, address indexed rewardToken, uint256 indexed blockNr, uint256 amount);\\n\\n function rewardToken() external view returns (IERC20);\\n\\n function Rewards(\\n uint256 blockNumber\\n ) external view returns (uint256 balance, bytes32 merkleRoot, uint256 withdrawUnlockTime, uint256 ratio);\\n\\n function delegatorAddresses(address _delegator) external view returns (address originalRecipient);\\n\\n function setDelegator(address _recipient, address _delegator) external;\\n\\n function addReward(\\n uint256 amount,\\n bytes32 merkleRoot,\\n uint256 blockNumber,\\n uint256 withdrawUnlockTime,\\n uint256 totalStakedBalance\\n ) external;\\n\\n function withdrawFunds(uint256 blockNumber, uint256 amount) external;\\n\\n function claim(uint256 blockNumber, bytes[] calldata proof) external;\\n\\n function isClaimable(uint256 blockNumber, address account, bytes[] calldata proof) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa6ea729a26b7d515f1f4c9732a955d84253d5c57f68d40d0441f82c0955816a\",\"license\":\"GPL-3.0\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613915806100206000396000f3fe608060405234801561001057600080fd5b50600436106101505760003560e01c80639366452c116100cd578063e525310511610081578063f301af4211610066578063f301af421461032b578063f7c618c11461033e578063f8738c251461035157600080fd5b8063e5253105146102f1578063ec87621c1461030457600080fd5b8063a217fddf116100b2578063a217fddf146102c3578063c4d66de8146102cb578063d547741f146102de57600080fd5b80639366452c146102895780639b87ab6d1461029c57600080fd5b80632f2ff15d1161012457806341f891a41161010957806341f891a4146101fc5780636d46379b1461023d57806391d148541461025057600080fd5b80632f2ff15d146101d657806336568abe146101e957600080fd5b8062501e281461015557806301ffc9a71461016a5780631ce92be514610192578063248a9ca3146101a5575b600080fd5b6101686101633660046133a8565b6103a6565b005b61017d6101783660046133f4565b61062b565b60405190151581526020015b60405180910390f35b6101686101a0366004613433565b610694565b6101c86101b336600461346c565b60009081526097602052604090206001015490565b604051908152602001610189565b6101686101e4366004613485565b610768565b6101686101f7366004613485565b61078d565b61022561020a3660046134aa565b60cc602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610189565b61017d61024b3660046134c7565b610819565b61017d61025e366004613485565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610168610297366004613523565b6108b3565b6101c87f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c281565b6101c8600081565b6101686102d93660046134aa565b610b77565b6101686102ec366004613485565b610d7c565b6101686102ff36600461355e565b610da1565b6101c87f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b6101c861033936600461346c565b610f02565b60c954610225906001600160a01b031681565b61038661035f36600461346c565b60cb6020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610189565b6103ae610f23565b600083815260cb6020526040902060018101546104125760405162461bcd60e51b815260206004820152601060248201527f526577617264206e6f7420666f756e640000000000000000000000000000000060448201526064015b60405180910390fd5b33600090815260cc60205260408120546001600160a01b0316610435573361044f565b33600090815260cc60205260409020546001600160a01b03165b604080516001600160a01b0383166020820152600291810191909152909150600090606001604051602081830303815290604052805190602001209050600061049e8460010154838888610f7c565b905060006ec097ce7bc90715b34b9f10000000008560030154836104c29190613596565b6104cc91906135c3565b905080856000015410156105225760405162461bcd60e51b815260206004820152601d60248201527f436c61696d20756e6465722d66756e6465642062792066756e6465722e0000006044820152606401610409565b600088815260cb6020908152604080832086845260040190915290205460ff161561058f5760405162461bcd60e51b815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152606401610409565b60008381526004860160205260409020805460ff1916600117905584546105b79082906135d7565b855560c9546105d0906001600160a01b03168583611019565b60c95460405182815289916001600160a01b0390811691908716907fceea116ca90ae38b5f3bcd7482763d0bdd5915faed2146d37b1e3bcd1ea425379060200160405180910390a4505050505061062660018055565b505050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061068e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086106be816110b0565b6001600160a01b038316158015906106de57506001600160a01b03821615155b61072a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420616464726573732070726f766964656400000000000000006044820152606401610409565b506001600160a01b03908116600090815260cc6020526040902080549190921673ffffffffffffffffffffffffffffffffffffffff19909116179055565b600082815260976020526040902060010154610783816110b0565b61062683836110bd565b6001600160a01b038116331461080b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610409565b610815828261115f565b5050565b600084815260cb602090815260408083206001015481516001600160a01b0388168185015260028184015282518082038401815260609091019092528151919092012081830361086e576000925050506108ab565b600087815260cb6020908152604080832084845260040190915290205460ff161580156108a6575060006108a483838888610f7c565b115b925050505b949350505050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086108dd816110b0565b8461092a5760405162461bcd60e51b815260206004820152601a60248201527f4d65726b6c6520726f6f742063616e6e6f74206265207a65726f0000000000006044820152606401610409565b600084815260cb6020526040902060018101541561098a5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6520726f6f742077617320616c726561647920706f7374656400006044820152606401610409565b60c9546040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1091906135ea565b9050600088118015610a225750808811155b610a945760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420616d6f756e74206f7220696e73756666696369656e74206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610409565b60c954610aac906001600160a01b031633308b6111e2565b878255600182018790556002820185905583610ad7896ec097ce7bc90715b34b9f1000000000613596565b610ae191906135c3565b600383015560ca80546001810182556000919091527f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee10186905560c954604080518a81526020810189905290810187905288916001600160a01b03169033907f4993e379e2a0a87975314480436d8f2de32d291a64892cb63cdb0839d09044369060600160405180910390a45050505050505050565b600054610100900460ff1615808015610b975750600054600160ff909116105b80610bb15750303b158015610bb1575060005460ff166001145b610c235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610409565b6000805460ff191660011790558015610c46576000805461ff0019166101001790555b610c4e611239565b610c566112ae565b6001600160a01b038216610cac5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e2063616e6e6f74206265207a65726f0000000000000000000000006044820152606401610409565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416179055610cdf6000336110bd565b610d097f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08336110bd565b610d337f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2336110bd565b8015610815576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260976020526040902060010154610d97816110b0565b610626838361115f565b7f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2610dcb816110b0565b600083815260cb602052604090206002810154421015610e2d5760405162461bcd60e51b815260206004820152601c60248201527f52657761726473206d6179206e6f742062652077697468647261776e000000006044820152606401610409565b8054831115610e7e5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610409565b82816000016000828254610e9291906135d7565b918290555082555060c954610eb1906001600160a01b03163385611019565b6001808201546040805187815260208101879052908101929092529033907f210aece5a2bb3ac8bbec4d3bd83444123ef037a899b89d617e735799f983e6b39060600160405180910390a350505050565b60ca8181548110610f1257600080fd5b600091825260209091200154905081565b600260015403610f755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610409565b6002600155565b600080610fbd610fb886604051602001610f9891815260200190565b60408051601f19818403018152919052610fb2868861364a565b89611319565b61133e565b905060005b815181101561100f57818181518110610fdd57610fdd61371f565b016020015160f81c610ff184610100613596565b610ffb9190613735565b92508061100781613748565b915050610fc2565b5050949350505050565b6040516001600160a01b0383166024820152604481018290526106269084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152611351565b60018055565b6110ba8133611439565b50565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155760008281526097602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561111b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff16156108155760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516001600160a01b03808516602483015283166044820152606481018290526112339085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161105e565b50505050565b600054610100900460ff166112a45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6112ac6114ae565b565b600054610100900460ff166112ac5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060600061132685611519565b905061133381858561154b565b9150505b9392505050565b606061068e61134c83611e67565b611f23565b60006113a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120589092919063ffffffff16565b90508051600014806113c75750808060200190518101906113c79190613761565b6106265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610409565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155761146c81612067565b611477836020612079565b6040516020016114889291906137a7565b60408051601f198184030181529082905262461bcd60e51b825261040991600401613828565b600054610100900460ff166110aa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060818051906020012060405160200161153591815260200190565b6040516020818303038152906040529050919050565b6060600084511161159e5760405162461bcd60e51b815260206004820152601560248201527f4d65726b6c65547269653a20656d707479206b657900000000000000000000006044820152606401610409565b60006115a98461225a565b905060006115b686612349565b90506000846040516020016115cd91815260200190565b60405160208183030381529060405290506000805b8451811015611df85760008582815181106115ff576115ff61371f565b6020026020010151905084518311156116805760405162461bcd60e51b815260206004820152602e60248201527f4d65726b6c65547269653a206b657920696e646578206578636565647320746f60448201527f74616c206b6579206c656e6774680000000000000000000000000000000000006064820152608401610409565b8260000361171f57805180516020918201206040516116ce926116a892910190815260200190565b604051602081830303815290604052858051602091820120825192909101919091201490565b61171a5760405162461bcd60e51b815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f7420686173680000006044820152606401610409565b611842565b8051516020116117bb5780518051602091820120604051611749926116a892910190815260200190565b61171a5760405162461bcd60e51b815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c2068617368000000000000000000000000000000000000000000000000006064820152608401610409565b8051845160208087019190912082519190920120146118425760405162461bcd60e51b815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f65206861736800000000000000000000000000000000000000000000000000006064820152608401610409565b61184e60106001613735565b816020015151036119fb578451830361199357600061188a826020015160108151811061187d5761187d61371f565b6020026020010151611f23565b905060008151116119035760405162461bcd60e51b815260206004820152603b60248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286272616e63682900000000006064820152608401610409565b6001875161191191906135d7565b83146119855760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286272616e6368290000000000006064820152608401610409565b965061133795505050505050565b60008584815181106119a7576119a761371f565b602001015160f81c60f81b60f81c9050600082602001518260ff16815181106119d2576119d261371f565b602002602001015190506119e5816123ac565b95506119f2600186613735565b94505050611de5565b600281602001515103611d77576000611a13826123d1565b9050600081600081518110611a2a57611a2a61371f565b016020015160f81c90506000611a4160028361385b565b611a4c90600261387d565b90506000611a5d848360ff166123f5565b90506000611a6b8a896123f5565b90506000611a79838361242b565b905080835114611af15760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a20706174682072656d61696e646572206d7573742060448201527f736861726520616c6c206e6962626c65732077697468206b65790000000000006064820152608401610409565b60ff851660021480611b06575060ff85166003145b15611cac5780825114611b815760405162461bcd60e51b815260206004820152603d60248201527f4d65726b6c65547269653a206b65792072656d61696e646572206d757374206260448201527f65206964656e746963616c20746f20706174682072656d61696e6465720000006064820152608401610409565b6000611b9d886020015160018151811061187d5761187d61371f565b90506000815111611c165760405162461bcd60e51b815260206004820152603960248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286c65616629000000000000006064820152608401610409565b60018d51611c2491906135d7565b8914611c985760405162461bcd60e51b815260206004820152603860248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286c6561662900000000000000006064820152608401610409565b9c506113379b505050505050505050505050565b60ff85161580611cbf575060ff85166001145b15611cfe57611ceb8760200151600181518110611cde57611cde61371f565b60200260200101516123ac565b9950611cf7818a613735565b9850611d6c565b60405162461bcd60e51b815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e2070726566697800000000000000000000000000006064820152608401610409565b505050505050611de5565b60405162461bcd60e51b815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f64650000000000000000000000000000000000000000000000006064820152608401610409565b5080611df081613748565b9150506115e2565b5060405162461bcd60e51b815260206004820152602560248201527f4d65726b6c65547269653a2072616e206f7574206f662070726f6f6620656c6560448201527f6d656e74730000000000000000000000000000000000000000000000000000006064820152608401610409565b60408051808201909152600080825260208201526000825111611f055760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b50604080518082019091528151815260209182019181019190915290565b60606000806000611f33856124aa565b919450925090506000816001811115611f4e57611f4e613896565b14611fc15760405162461bcd60e51b815260206004820152603960248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206279746573206973206e6f7420612064617461206974656d000000000000006064820152608401610409565b611fcb8284613735565b8551146120405760405162461bcd60e51b815260206004820152603460248201527f524c505265616465723a2062797465732076616c756520636f6e7461696e732060448201527f616e20696e76616c69642072656d61696e6465720000000000000000000000006064820152608401610409565b61204f85602001518484612d6c565b95945050505050565b60606108ab8484600085612e0d565b606061068e6001600160a01b03831660145b60606000612088836002613596565b612093906002613735565b67ffffffffffffffff8111156120ab576120ab613603565b6040519080825280601f01601f1916602001820160405280156120d5576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061210c5761210c61371f565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106121575761215761371f565b60200101906001600160f81b031916908160001a905350600061217b846002613596565b612186906001613735565b90505b600181111561220b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106121c7576121c761371f565b1a60f81b8282815181106121dd576121dd61371f565b60200101906001600160f81b031916908160001a90535060049490941c93612204816138ac565b9050612189565b5083156113375760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610409565b805160609060008167ffffffffffffffff81111561227a5761227a613603565b6040519080825280602002602001820160405280156122bf57816020015b60408051808201909152606080825260208201528152602001906001900390816122985790505b50905060005b828110156123415760405180604001604052808683815181106122ea576122ea61371f565b6020026020010151815260200161231987848151811061230c5761230c61371f565b6020026020010151612ef4565b81525082828151811061232e5761232e61371f565b60209081029190910101526001016122c5565b509392505050565b606080604051905082518060011b603f8101601f1916830160405280835250602084016020830160005b838110156123a1578060011b82018184015160001a8060041c8253600f811660018301535050600101612373565b509295945050505050565b606060208260000151106123c8576123c382611f23565b61068e565b61068e82612f07565b606061068e6123f0836020015160008151811061187d5761187d61371f565b612349565b606082518210612414575060408051602081019091526000815261068e565b611337838384865161242691906135d7565b612f1d565b60008060008351855110612440578351612443565b84515b90505b808210801561249a57508382815181106124625761246261371f565b602001015160f81c60f81b6001600160f81b0319168583815181106124895761248961371f565b01602001516001600160f81b031916145b1561234157816001019150612446565b60008060008084600001511161253b5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b6020840151805160001a607f8111612560576000600160009450945094505050612d65565b60b7811161270a5760006125756080836135d7565b9050808760000151116126165760405162461bcd60e51b815260206004820152604e60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20737472696e67206c656e6774682060648201527f2873686f727420737472696e6729000000000000000000000000000000000000608482015260a401610409565b6001838101516001600160f81b031916908214158061265f57507f80000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610155b6126f75760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a20696e76616c6964207072656669782c2073696e676c60448201527f652062797465203c203078383020617265206e6f74207072656669786564202860648201527f73686f727420737472696e672900000000000000000000000000000000000000608482015260a401610409565b5060019550935060009250612d65915050565b60bf81116129d857600061271f60b7836135d7565b9050808760000151116127c05760405162461bcd60e51b815260206004820152605160248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f6620737472696e67206c656e60648201527f67746820286c6f6e6720737472696e6729000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b031916600081900361286c5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e6720737472696e672900000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c603781116129165760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f20737472696e6729000000000000000000000000000000000000000000000000608482015260a401610409565b6129208184613735565b8951116129bb5760405162461bcd60e51b815260206004820152604c60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e6720737472696e67290000000000000000000000000000000000000000608482015260a401610409565b6129c6836001613735565b9750955060009450612d659350505050565b60f78111612a9f5760006129ed60c0836135d7565b905080876000015111612a8e5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e206c697374206c656e67746820287360648201527f686f7274206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b600195509350849250612d65915050565b6000612aac60f7836135d7565b905080876000015111612b4d5760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f66206c697374206c656e677460648201527f6820286c6f6e67206c6973742900000000000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b0319166000819003612bf95760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e67206c69737429000000000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c60378111612ca35760405162461bcd60e51b815260206004820152604660248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f206c697374290000000000000000000000000000000000000000000000000000608482015260a401610409565b612cad8184613735565b895111612d485760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e67206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b612d53836001613735565b9750955060019450612d659350505050565b9193909250565b606060008267ffffffffffffffff811115612d8957612d89613603565b6040519080825280601f01601f191660200182016040528015612db3576020820181803683370190505b50905082600003612dc5579050611337565b6000612dd18587613735565b90506020820160005b85811015612df2578281015182820152602001612dda565b85811115612e01576000868301525b50919695505050505050565b606082471015612e855760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610409565b600080866001600160a01b03168587604051612ea191906138c3565b60006040518083038185875af1925050503d8060008114612ede576040519150601f19603f3d011682016040523d82523d6000602084013e612ee3565b606091505b50915091506108a687838387613089565b606061068e612f0283611e67565b613102565b606061068e826020015160008460000151612d6c565b60608182601f011015612f725760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b828284011015612fc45760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b818301845110156130175760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610409565b6060821580156130365760405191506000825260208201604052613080565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561306f578051835260209283019201613057565b5050858452601f01601f1916604052505b50949350505050565b606083156130f85782516000036130f1576001600160a01b0385163b6130f15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610409565b50816108ab565b6108ab8383613332565b60606000806000613112856124aa565b91945092509050600181600181111561312d5761312d613896565b146131a05760405162461bcd60e51b815260206004820152603860248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206c697374206973206e6f742061206c697374206974656d00000000000000006064820152608401610409565b84516131ac8385613735565b1461321f5760405162461bcd60e51b815260206004820152603260248201527f524c505265616465723a206c697374206974656d2068617320616e20696e766160448201527f6c696420646174612072656d61696e64657200000000000000000000000000006064820152608401610409565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816132385790505090506000845b8751811015613326576000806132ab6040518060400160405280858d6000015161328f91906135d7565b8152602001858d602001516132a49190613735565b90526124aa565b5091509150604051806040016040528083836132c79190613735565b8152602001848c602001516132dc9190613735565b8152508585815181106132f1576132f161371f565b6020908102919091010152613307600185613735565b93506133138183613735565b61331d9084613735565b92505050613265565b50815295945050505050565b8151156133425781518083602001fd5b8060405162461bcd60e51b81526004016104099190613828565b60008083601f84011261336e57600080fd5b50813567ffffffffffffffff81111561338657600080fd5b6020830191508360208260051b85010111156133a157600080fd5b9250929050565b6000806000604084860312156133bd57600080fd5b83359250602084013567ffffffffffffffff8111156133db57600080fd5b6133e78682870161335c565b9497909650939450505050565b60006020828403121561340657600080fd5b81356001600160e01b03198116811461133757600080fd5b6001600160a01b03811681146110ba57600080fd5b6000806040838503121561344657600080fd5b82356134518161341e565b915060208301356134618161341e565b809150509250929050565b60006020828403121561347e57600080fd5b5035919050565b6000806040838503121561349857600080fd5b8235915060208301356134618161341e565b6000602082840312156134bc57600080fd5b81356113378161341e565b600080600080606085870312156134dd57600080fd5b8435935060208501356134ef8161341e565b9250604085013567ffffffffffffffff81111561350b57600080fd5b6135178782880161335c565b95989497509550505050565b600080600080600060a0868803121561353b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561357157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761068e5761068e613580565b634e487b7160e01b600052601260045260246000fd5b6000826135d2576135d26135ad565b500490565b8181038181111561068e5761068e613580565b6000602082840312156135fc57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561364257613642613603565b604052919050565b600067ffffffffffffffff8084111561366557613665613603565b8360051b6020613676818301613619565b86815291850191818101903684111561368e57600080fd5b865b84811015613713578035868111156136a85760008081fd5b8801601f36818301126136bb5760008081fd5b8135888111156136cd576136cd613603565b6136de818301601f19168801613619565b915080825236878285010111156136f55760008081fd5b80878401888401376000908201870152845250918301918301613690565b50979650505050505050565b634e487b7160e01b600052603260045260246000fd5b8082018082111561068e5761068e613580565b60006001820161375a5761375a613580565b5060010190565b60006020828403121561377357600080fd5b8151801515811461133757600080fd5b60005b8381101561379e578181015183820152602001613786565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516137df816017850160208801613783565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161381c816028840160208801613783565b01602801949350505050565b6020815260008251806020840152613847816040850160208701613783565b601f01601f19169190910160400192915050565b600060ff83168061386e5761386e6135ad565b8060ff84160691505092915050565b60ff828116828216039081111561068e5761068e613580565b634e487b7160e01b600052602160045260246000fd5b6000816138bb576138bb613580565b506000190190565b600082516138d5818460208701613783565b919091019291505056fea2646970667358221220555fb7703a0396dc6648d2932374db5690df8e7d88caabea3decd240afbb634364736f6c63430008130033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101505760003560e01c80639366452c116100cd578063e525310511610081578063f301af4211610066578063f301af421461032b578063f7c618c11461033e578063f8738c251461035157600080fd5b8063e5253105146102f1578063ec87621c1461030457600080fd5b8063a217fddf116100b2578063a217fddf146102c3578063c4d66de8146102cb578063d547741f146102de57600080fd5b80639366452c146102895780639b87ab6d1461029c57600080fd5b80632f2ff15d1161012457806341f891a41161010957806341f891a4146101fc5780636d46379b1461023d57806391d148541461025057600080fd5b80632f2ff15d146101d657806336568abe146101e957600080fd5b8062501e281461015557806301ffc9a71461016a5780631ce92be514610192578063248a9ca3146101a5575b600080fd5b6101686101633660046133a8565b6103a6565b005b61017d6101783660046133f4565b61062b565b60405190151581526020015b60405180910390f35b6101686101a0366004613433565b610694565b6101c86101b336600461346c565b60009081526097602052604090206001015490565b604051908152602001610189565b6101686101e4366004613485565b610768565b6101686101f7366004613485565b61078d565b61022561020a3660046134aa565b60cc602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610189565b61017d61024b3660046134c7565b610819565b61017d61025e366004613485565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610168610297366004613523565b6108b3565b6101c87f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c281565b6101c8600081565b6101686102d93660046134aa565b610b77565b6101686102ec366004613485565b610d7c565b6101686102ff36600461355e565b610da1565b6101c87f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b6101c861033936600461346c565b610f02565b60c954610225906001600160a01b031681565b61038661035f36600461346c565b60cb6020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610189565b6103ae610f23565b600083815260cb6020526040902060018101546104125760405162461bcd60e51b815260206004820152601060248201527f526577617264206e6f7420666f756e640000000000000000000000000000000060448201526064015b60405180910390fd5b33600090815260cc60205260408120546001600160a01b0316610435573361044f565b33600090815260cc60205260409020546001600160a01b03165b604080516001600160a01b0383166020820152600291810191909152909150600090606001604051602081830303815290604052805190602001209050600061049e8460010154838888610f7c565b905060006ec097ce7bc90715b34b9f10000000008560030154836104c29190613596565b6104cc91906135c3565b905080856000015410156105225760405162461bcd60e51b815260206004820152601d60248201527f436c61696d20756e6465722d66756e6465642062792066756e6465722e0000006044820152606401610409565b600088815260cb6020908152604080832086845260040190915290205460ff161561058f5760405162461bcd60e51b815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152606401610409565b60008381526004860160205260409020805460ff1916600117905584546105b79082906135d7565b855560c9546105d0906001600160a01b03168583611019565b60c95460405182815289916001600160a01b0390811691908716907fceea116ca90ae38b5f3bcd7482763d0bdd5915faed2146d37b1e3bcd1ea425379060200160405180910390a4505050505061062660018055565b505050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061068e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086106be816110b0565b6001600160a01b038316158015906106de57506001600160a01b03821615155b61072a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420616464726573732070726f766964656400000000000000006044820152606401610409565b506001600160a01b03908116600090815260cc6020526040902080549190921673ffffffffffffffffffffffffffffffffffffffff19909116179055565b600082815260976020526040902060010154610783816110b0565b61062683836110bd565b6001600160a01b038116331461080b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610409565b610815828261115f565b5050565b600084815260cb602090815260408083206001015481516001600160a01b0388168185015260028184015282518082038401815260609091019092528151919092012081830361086e576000925050506108ab565b600087815260cb6020908152604080832084845260040190915290205460ff161580156108a6575060006108a483838888610f7c565b115b925050505b949350505050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086108dd816110b0565b8461092a5760405162461bcd60e51b815260206004820152601a60248201527f4d65726b6c6520726f6f742063616e6e6f74206265207a65726f0000000000006044820152606401610409565b600084815260cb6020526040902060018101541561098a5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6520726f6f742077617320616c726561647920706f7374656400006044820152606401610409565b60c9546040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1091906135ea565b9050600088118015610a225750808811155b610a945760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420616d6f756e74206f7220696e73756666696369656e74206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610409565b60c954610aac906001600160a01b031633308b6111e2565b878255600182018790556002820185905583610ad7896ec097ce7bc90715b34b9f1000000000613596565b610ae191906135c3565b600383015560ca80546001810182556000919091527f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee10186905560c954604080518a81526020810189905290810187905288916001600160a01b03169033907f4993e379e2a0a87975314480436d8f2de32d291a64892cb63cdb0839d09044369060600160405180910390a45050505050505050565b600054610100900460ff1615808015610b975750600054600160ff909116105b80610bb15750303b158015610bb1575060005460ff166001145b610c235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610409565b6000805460ff191660011790558015610c46576000805461ff0019166101001790555b610c4e611239565b610c566112ae565b6001600160a01b038216610cac5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e2063616e6e6f74206265207a65726f0000000000000000000000006044820152606401610409565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416179055610cdf6000336110bd565b610d097f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08336110bd565b610d337f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2336110bd565b8015610815576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260976020526040902060010154610d97816110b0565b610626838361115f565b7f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2610dcb816110b0565b600083815260cb602052604090206002810154421015610e2d5760405162461bcd60e51b815260206004820152601c60248201527f52657761726473206d6179206e6f742062652077697468647261776e000000006044820152606401610409565b8054831115610e7e5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610409565b82816000016000828254610e9291906135d7565b918290555082555060c954610eb1906001600160a01b03163385611019565b6001808201546040805187815260208101879052908101929092529033907f210aece5a2bb3ac8bbec4d3bd83444123ef037a899b89d617e735799f983e6b39060600160405180910390a350505050565b60ca8181548110610f1257600080fd5b600091825260209091200154905081565b600260015403610f755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610409565b6002600155565b600080610fbd610fb886604051602001610f9891815260200190565b60408051601f19818403018152919052610fb2868861364a565b89611319565b61133e565b905060005b815181101561100f57818181518110610fdd57610fdd61371f565b016020015160f81c610ff184610100613596565b610ffb9190613735565b92508061100781613748565b915050610fc2565b5050949350505050565b6040516001600160a01b0383166024820152604481018290526106269084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152611351565b60018055565b6110ba8133611439565b50565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155760008281526097602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561111b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff16156108155760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516001600160a01b03808516602483015283166044820152606481018290526112339085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161105e565b50505050565b600054610100900460ff166112a45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6112ac6114ae565b565b600054610100900460ff166112ac5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060600061132685611519565b905061133381858561154b565b9150505b9392505050565b606061068e61134c83611e67565b611f23565b60006113a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120589092919063ffffffff16565b90508051600014806113c75750808060200190518101906113c79190613761565b6106265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610409565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155761146c81612067565b611477836020612079565b6040516020016114889291906137a7565b60408051601f198184030181529082905262461bcd60e51b825261040991600401613828565b600054610100900460ff166110aa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060818051906020012060405160200161153591815260200190565b6040516020818303038152906040529050919050565b6060600084511161159e5760405162461bcd60e51b815260206004820152601560248201527f4d65726b6c65547269653a20656d707479206b657900000000000000000000006044820152606401610409565b60006115a98461225a565b905060006115b686612349565b90506000846040516020016115cd91815260200190565b60405160208183030381529060405290506000805b8451811015611df85760008582815181106115ff576115ff61371f565b6020026020010151905084518311156116805760405162461bcd60e51b815260206004820152602e60248201527f4d65726b6c65547269653a206b657920696e646578206578636565647320746f60448201527f74616c206b6579206c656e6774680000000000000000000000000000000000006064820152608401610409565b8260000361171f57805180516020918201206040516116ce926116a892910190815260200190565b604051602081830303815290604052858051602091820120825192909101919091201490565b61171a5760405162461bcd60e51b815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f7420686173680000006044820152606401610409565b611842565b8051516020116117bb5780518051602091820120604051611749926116a892910190815260200190565b61171a5760405162461bcd60e51b815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c2068617368000000000000000000000000000000000000000000000000006064820152608401610409565b8051845160208087019190912082519190920120146118425760405162461bcd60e51b815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f65206861736800000000000000000000000000000000000000000000000000006064820152608401610409565b61184e60106001613735565b816020015151036119fb578451830361199357600061188a826020015160108151811061187d5761187d61371f565b6020026020010151611f23565b905060008151116119035760405162461bcd60e51b815260206004820152603b60248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286272616e63682900000000006064820152608401610409565b6001875161191191906135d7565b83146119855760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286272616e6368290000000000006064820152608401610409565b965061133795505050505050565b60008584815181106119a7576119a761371f565b602001015160f81c60f81b60f81c9050600082602001518260ff16815181106119d2576119d261371f565b602002602001015190506119e5816123ac565b95506119f2600186613735565b94505050611de5565b600281602001515103611d77576000611a13826123d1565b9050600081600081518110611a2a57611a2a61371f565b016020015160f81c90506000611a4160028361385b565b611a4c90600261387d565b90506000611a5d848360ff166123f5565b90506000611a6b8a896123f5565b90506000611a79838361242b565b905080835114611af15760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a20706174682072656d61696e646572206d7573742060448201527f736861726520616c6c206e6962626c65732077697468206b65790000000000006064820152608401610409565b60ff851660021480611b06575060ff85166003145b15611cac5780825114611b815760405162461bcd60e51b815260206004820152603d60248201527f4d65726b6c65547269653a206b65792072656d61696e646572206d757374206260448201527f65206964656e746963616c20746f20706174682072656d61696e6465720000006064820152608401610409565b6000611b9d886020015160018151811061187d5761187d61371f565b90506000815111611c165760405162461bcd60e51b815260206004820152603960248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286c65616629000000000000006064820152608401610409565b60018d51611c2491906135d7565b8914611c985760405162461bcd60e51b815260206004820152603860248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286c6561662900000000000000006064820152608401610409565b9c506113379b505050505050505050505050565b60ff85161580611cbf575060ff85166001145b15611cfe57611ceb8760200151600181518110611cde57611cde61371f565b60200260200101516123ac565b9950611cf7818a613735565b9850611d6c565b60405162461bcd60e51b815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e2070726566697800000000000000000000000000006064820152608401610409565b505050505050611de5565b60405162461bcd60e51b815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f64650000000000000000000000000000000000000000000000006064820152608401610409565b5080611df081613748565b9150506115e2565b5060405162461bcd60e51b815260206004820152602560248201527f4d65726b6c65547269653a2072616e206f7574206f662070726f6f6620656c6560448201527f6d656e74730000000000000000000000000000000000000000000000000000006064820152608401610409565b60408051808201909152600080825260208201526000825111611f055760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b50604080518082019091528151815260209182019181019190915290565b60606000806000611f33856124aa565b919450925090506000816001811115611f4e57611f4e613896565b14611fc15760405162461bcd60e51b815260206004820152603960248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206279746573206973206e6f7420612064617461206974656d000000000000006064820152608401610409565b611fcb8284613735565b8551146120405760405162461bcd60e51b815260206004820152603460248201527f524c505265616465723a2062797465732076616c756520636f6e7461696e732060448201527f616e20696e76616c69642072656d61696e6465720000000000000000000000006064820152608401610409565b61204f85602001518484612d6c565b95945050505050565b60606108ab8484600085612e0d565b606061068e6001600160a01b03831660145b60606000612088836002613596565b612093906002613735565b67ffffffffffffffff8111156120ab576120ab613603565b6040519080825280601f01601f1916602001820160405280156120d5576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061210c5761210c61371f565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106121575761215761371f565b60200101906001600160f81b031916908160001a905350600061217b846002613596565b612186906001613735565b90505b600181111561220b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106121c7576121c761371f565b1a60f81b8282815181106121dd576121dd61371f565b60200101906001600160f81b031916908160001a90535060049490941c93612204816138ac565b9050612189565b5083156113375760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610409565b805160609060008167ffffffffffffffff81111561227a5761227a613603565b6040519080825280602002602001820160405280156122bf57816020015b60408051808201909152606080825260208201528152602001906001900390816122985790505b50905060005b828110156123415760405180604001604052808683815181106122ea576122ea61371f565b6020026020010151815260200161231987848151811061230c5761230c61371f565b6020026020010151612ef4565b81525082828151811061232e5761232e61371f565b60209081029190910101526001016122c5565b509392505050565b606080604051905082518060011b603f8101601f1916830160405280835250602084016020830160005b838110156123a1578060011b82018184015160001a8060041c8253600f811660018301535050600101612373565b509295945050505050565b606060208260000151106123c8576123c382611f23565b61068e565b61068e82612f07565b606061068e6123f0836020015160008151811061187d5761187d61371f565b612349565b606082518210612414575060408051602081019091526000815261068e565b611337838384865161242691906135d7565b612f1d565b60008060008351855110612440578351612443565b84515b90505b808210801561249a57508382815181106124625761246261371f565b602001015160f81c60f81b6001600160f81b0319168583815181106124895761248961371f565b01602001516001600160f81b031916145b1561234157816001019150612446565b60008060008084600001511161253b5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b6020840151805160001a607f8111612560576000600160009450945094505050612d65565b60b7811161270a5760006125756080836135d7565b9050808760000151116126165760405162461bcd60e51b815260206004820152604e60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20737472696e67206c656e6774682060648201527f2873686f727420737472696e6729000000000000000000000000000000000000608482015260a401610409565b6001838101516001600160f81b031916908214158061265f57507f80000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610155b6126f75760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a20696e76616c6964207072656669782c2073696e676c60448201527f652062797465203c203078383020617265206e6f74207072656669786564202860648201527f73686f727420737472696e672900000000000000000000000000000000000000608482015260a401610409565b5060019550935060009250612d65915050565b60bf81116129d857600061271f60b7836135d7565b9050808760000151116127c05760405162461bcd60e51b815260206004820152605160248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f6620737472696e67206c656e60648201527f67746820286c6f6e6720737472696e6729000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b031916600081900361286c5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e6720737472696e672900000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c603781116129165760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f20737472696e6729000000000000000000000000000000000000000000000000608482015260a401610409565b6129208184613735565b8951116129bb5760405162461bcd60e51b815260206004820152604c60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e6720737472696e67290000000000000000000000000000000000000000608482015260a401610409565b6129c6836001613735565b9750955060009450612d659350505050565b60f78111612a9f5760006129ed60c0836135d7565b905080876000015111612a8e5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e206c697374206c656e67746820287360648201527f686f7274206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b600195509350849250612d65915050565b6000612aac60f7836135d7565b905080876000015111612b4d5760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f66206c697374206c656e677460648201527f6820286c6f6e67206c6973742900000000000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b0319166000819003612bf95760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e67206c69737429000000000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c60378111612ca35760405162461bcd60e51b815260206004820152604660248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f206c697374290000000000000000000000000000000000000000000000000000608482015260a401610409565b612cad8184613735565b895111612d485760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e67206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b612d53836001613735565b9750955060019450612d659350505050565b9193909250565b606060008267ffffffffffffffff811115612d8957612d89613603565b6040519080825280601f01601f191660200182016040528015612db3576020820181803683370190505b50905082600003612dc5579050611337565b6000612dd18587613735565b90506020820160005b85811015612df2578281015182820152602001612dda565b85811115612e01576000868301525b50919695505050505050565b606082471015612e855760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610409565b600080866001600160a01b03168587604051612ea191906138c3565b60006040518083038185875af1925050503d8060008114612ede576040519150601f19603f3d011682016040523d82523d6000602084013e612ee3565b606091505b50915091506108a687838387613089565b606061068e612f0283611e67565b613102565b606061068e826020015160008460000151612d6c565b60608182601f011015612f725760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b828284011015612fc45760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b818301845110156130175760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610409565b6060821580156130365760405191506000825260208201604052613080565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561306f578051835260209283019201613057565b5050858452601f01601f1916604052505b50949350505050565b606083156130f85782516000036130f1576001600160a01b0385163b6130f15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610409565b50816108ab565b6108ab8383613332565b60606000806000613112856124aa565b91945092509050600181600181111561312d5761312d613896565b146131a05760405162461bcd60e51b815260206004820152603860248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206c697374206973206e6f742061206c697374206974656d00000000000000006064820152608401610409565b84516131ac8385613735565b1461321f5760405162461bcd60e51b815260206004820152603260248201527f524c505265616465723a206c697374206974656d2068617320616e20696e766160448201527f6c696420646174612072656d61696e64657200000000000000000000000000006064820152608401610409565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816132385790505090506000845b8751811015613326576000806132ab6040518060400160405280858d6000015161328f91906135d7565b8152602001858d602001516132a49190613735565b90526124aa565b5091509150604051806040016040528083836132c79190613735565b8152602001848c602001516132dc9190613735565b8152508585815181106132f1576132f161371f565b6020908102919091010152613307600185613735565b93506133138183613735565b61331d9084613735565b92505050613265565b50815295945050505050565b8151156133425781518083602001fd5b8060405162461bcd60e51b81526004016104099190613828565b60008083601f84011261336e57600080fd5b50813567ffffffffffffffff81111561338657600080fd5b6020830191508360208260051b85010111156133a157600080fd5b9250929050565b6000806000604084860312156133bd57600080fd5b83359250602084013567ffffffffffffffff8111156133db57600080fd5b6133e78682870161335c565b9497909650939450505050565b60006020828403121561340657600080fd5b81356001600160e01b03198116811461133757600080fd5b6001600160a01b03811681146110ba57600080fd5b6000806040838503121561344657600080fd5b82356134518161341e565b915060208301356134618161341e565b809150509250929050565b60006020828403121561347e57600080fd5b5035919050565b6000806040838503121561349857600080fd5b8235915060208301356134618161341e565b6000602082840312156134bc57600080fd5b81356113378161341e565b600080600080606085870312156134dd57600080fd5b8435935060208501356134ef8161341e565b9250604085013567ffffffffffffffff81111561350b57600080fd5b6135178782880161335c565b95989497509550505050565b600080600080600060a0868803121561353b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561357157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761068e5761068e613580565b634e487b7160e01b600052601260045260246000fd5b6000826135d2576135d26135ad565b500490565b8181038181111561068e5761068e613580565b6000602082840312156135fc57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561364257613642613603565b604052919050565b600067ffffffffffffffff8084111561366557613665613603565b8360051b6020613676818301613619565b86815291850191818101903684111561368e57600080fd5b865b84811015613713578035868111156136a85760008081fd5b8801601f36818301126136bb5760008081fd5b8135888111156136cd576136cd613603565b6136de818301601f19168801613619565b915080825236878285010111156136f55760008081fd5b80878401888401376000908201870152845250918301918301613690565b50979650505050505050565b634e487b7160e01b600052603260045260246000fd5b8082018082111561068e5761068e613580565b60006001820161375a5761375a613580565b5060010190565b60006020828403121561377357600080fd5b8151801515811461133757600080fd5b60005b8381101561379e578181015183820152602001613786565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516137df816017850160208801613783565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161381c816028840160208801613783565b01602801949350505050565b6020815260008251806020840152613847816040850160208701613783565b601f01601f19169190910160400192915050565b600060ff83168061386e5761386e6135ad565b8060ff84160691505092915050565b60ff828116828216039081111561068e5761068e613580565b634e487b7160e01b600052602160045260246000fd5b6000816138bb576138bb613580565b506000190190565b600082516138d5818460208701613783565b919091019291505056fea2646970667358221220555fb7703a0396dc6648d2932374db5690df8e7d88caabea3decd240afbb634364736f6c63430008130033", + "numDeployments": 2, + "solcInputHash": "e41af02d1a0e58fedcc89f1f25416408", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNr\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"MerkleClaim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"funder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNr\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"withdrawal\",\"type\":\"bool\"}],\"name\":\"MerkleFundUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNr\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawUnlockTime\",\"type\":\"uint256\"}],\"name\":\"NewMerkle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNDS_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MANAGER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"Rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"withdrawUnlockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawUnlockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalStakedBalance\",\"type\":\"uint256\"}],\"name\":\"addReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"proof\",\"type\":\"bytes[]\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegatorAddresses\",\"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\":\"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\":\"contract IERC20\",\"name\":\"_rewardToken\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes[]\",\"name\":\"proof\",\"type\":\"bytes[]\"}],\"name\":\"isClaimable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_delegator\",\"type\":\"address\"}],\"name\":\"setDelegator\",\"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\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"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\":{\"addReward(uint256,bytes32,uint256,uint256,uint256)\":{\"params\":{\"amount\":\"The amount of reward tokens to deposit\",\"blockNumber\":\"The block number for the Reward\",\"merkleRoot\":\"The merkle root of the distribution tree\",\"totalStakedBalance\":\"Total staked balance of the merkleRoot (computed off-chain)\",\"withdrawUnlockTime\":\"The timestamp after which withdrawals by owner are allowed\"}},\"claim(uint256,bytes[])\":{\"details\":\"Checks proofs and claims tracking before transferring rewardTokens\",\"params\":{\"blockNumber\":\"The block number for the Reward\",\"proof\":\"The merkle proof for the claim\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address)\":{\"params\":{\"_rewardToken\":\"The reward token to be distributed\"}},\"isClaimable(uint256,address,bytes[])\":{\"params\":{\"account\":\"The address of the account claiming\",\"blockNumber\":\"The block number for the Reward\",\"proof\":\"The merkle proof for the claim\"},\"returns\":{\"_0\":\"A bool indicating if the claim is valid and claimable\"}},\"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.\"},\"setDelegator(address,address)\":{\"params\":{\"_delegator\":\"The address that sould claim on behalf of the owner\",\"_recipient\":\"original eligible recipient address\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdrawFunds(uint256,uint256)\":{\"params\":{\"amount\":\"The amount to withdraw\",\"blockNumber\":\"The block number for the Reward\"}}},\"title\":\"Sonne Finance Merkle tree-based rewards distributor\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addReward(uint256,bytes32,uint256,uint256,uint256)\":{\"notice\":\"Creates a new Reward struct for a rewards distribution\"},\"claim(uint256,bytes[])\":{\"notice\":\"Claims the specified amount for an account if valid\"},\"initialize(address)\":{\"notice\":\"Contract constructor to initialize rewardToken\"},\"isClaimable(uint256,address,bytes[])\":{\"notice\":\"Checks if a claim is valid and claimable\"},\"setDelegator(address,address)\":{\"notice\":\"Sets a delegator address for a given recipient\"},\"withdrawFunds(uint256,uint256)\":{\"notice\":\"Allows to withdraw available funds to owner after unlock time\"}},\"notice\":\"Contract to distribute rewards on BASE network to Sonne Finance Optimism stakers\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SonneMerkleDistributor.sol\":\"SonneMerkleDistributor\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@eth-optimism/contracts-bedrock/contracts/libraries/Bytes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @title Bytes\\n/// @notice Bytes is a library for manipulating byte arrays.\\nlibrary Bytes {\\n /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils\\n /// @notice Slices a byte array with a given starting index and length. Returns a new byte array\\n /// as opposed to a pointer to the original array. Will throw if trying to slice more\\n /// bytes than exist in the array.\\n /// @param _bytes Byte array to slice.\\n /// @param _start Starting index of the slice.\\n /// @param _length Length of the slice.\\n /// @return Slice of the input byte array.\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n ) internal pure returns (bytes memory) {\\n unchecked {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_start + _length >= _start, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n }\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n /// @notice Slices a byte array with a given starting index up to the end of the original byte\\n /// array. Returns a new array rathern than a pointer to the original.\\n /// @param _bytes Byte array to slice.\\n /// @param _start Starting index of the slice.\\n /// @return Slice of the input byte array.\\n function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\\n if (_start >= _bytes.length) {\\n return bytes(\\\"\\\");\\n }\\n return slice(_bytes, _start, _bytes.length - _start);\\n }\\n\\n /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles.\\n /// Resulting nibble array will be exactly twice as long as the input byte array.\\n /// @param _bytes Input byte array to convert.\\n /// @return Resulting nibble array.\\n function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\\n bytes memory _nibbles;\\n assembly {\\n // Grab a free memory offset for the new array\\n _nibbles := mload(0x40)\\n\\n // Load the length of the passed bytes array from memory\\n let bytesLength := mload(_bytes)\\n\\n // Calculate the length of the new nibble array\\n // This is the length of the input array times 2\\n let nibblesLength := shl(0x01, bytesLength)\\n\\n // Update the free memory pointer to allocate memory for the new array.\\n // To do this, we add the length of the new array + 32 bytes for the array length\\n // rounded up to the nearest 32 byte boundary to the current free memory pointer.\\n mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F))))\\n\\n // Store the length of the new array in memory\\n mstore(_nibbles, nibblesLength)\\n\\n // Store the memory offset of the _bytes array's contents on the stack\\n let bytesStart := add(_bytes, 0x20)\\n\\n // Store the memory offset of the nibbles array's contents on the stack\\n let nibblesStart := add(_nibbles, 0x20)\\n\\n // Loop through each byte in the input array\\n for {\\n let i := 0x00\\n } lt(i, bytesLength) {\\n i := add(i, 0x01)\\n } {\\n // Get the starting offset of the next 2 bytes in the nibbles array\\n let offset := add(nibblesStart, shl(0x01, i))\\n // Load the byte at the current index within the `_bytes` array\\n let b := byte(0x00, mload(add(bytesStart, i)))\\n\\n // Pull out the first nibble and store it in the new array\\n mstore8(offset, shr(0x04, b))\\n // Pull out the second nibble and store it in the new array\\n mstore8(add(offset, 0x01), and(b, 0x0F))\\n }\\n }\\n return _nibbles;\\n }\\n\\n /// @notice Compares two byte arrays by comparing their keccak256 hashes.\\n /// @param _bytes First byte array to compare.\\n /// @param _other Second byte array to compare.\\n /// @return True if the two byte arrays are equal, false otherwise.\\n function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\\n return keccak256(_bytes) == keccak256(_other);\\n }\\n}\\n\",\"keccak256\":\"0x6fa7ba368cfee95b16b177c92745583736ad623befb81c8ae98ce020e670ce44\",\"license\":\"MIT\"},\"@eth-optimism/contracts-bedrock/contracts/libraries/rlp/RLPReader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.8;\\n\\n/**\\n * @custom:attribution https://github.com/hamdiallam/Solidity-RLP\\n * @title RLPReader\\n * @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted\\n * from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with\\n * various tweaks to improve readability.\\n */\\nlibrary RLPReader {\\n /**\\n * Custom pointer type to avoid confusion between pointers and uint256s.\\n */\\n type MemoryPointer is uint256;\\n\\n /**\\n * @notice RLP item types.\\n *\\n * @custom:value DATA_ITEM Represents an RLP data item (NOT a list).\\n * @custom:value LIST_ITEM Represents an RLP list item.\\n */\\n enum RLPItemType {\\n DATA_ITEM,\\n LIST_ITEM\\n }\\n\\n /**\\n * @notice Struct representing an RLP item.\\n *\\n * @custom:field length Length of the RLP item.\\n * @custom:field ptr Pointer to the RLP item in memory.\\n */\\n struct RLPItem {\\n uint256 length;\\n MemoryPointer ptr;\\n }\\n\\n /**\\n * @notice Max list length that this library will accept.\\n */\\n uint256 internal constant MAX_LIST_LENGTH = 32;\\n\\n /**\\n * @notice Converts bytes to a reference to memory position and length.\\n *\\n * @param _in Input bytes to convert.\\n *\\n * @return Output memory reference.\\n */\\n function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory) {\\n // Empty arrays are not RLP items.\\n require(\\n _in.length > 0,\\n \\\"RLPReader: length of an RLP item must be greater than zero to be decodable\\\"\\n );\\n\\n MemoryPointer ptr;\\n assembly {\\n ptr := add(_in, 32)\\n }\\n\\n return RLPItem({ length: _in.length, ptr: ptr });\\n }\\n\\n /**\\n * @notice Reads an RLP list value into a list of RLP items.\\n *\\n * @param _in RLP list value.\\n *\\n * @return Decoded RLP list items.\\n */\\n function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory) {\\n (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.LIST_ITEM,\\n \\\"RLPReader: decoded item type for list is not a list item\\\"\\n );\\n\\n require(\\n listOffset + listLength == _in.length,\\n \\\"RLPReader: list item has an invalid data remainder\\\"\\n );\\n\\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\\n // writing to the length. Since we can't know the number of RLP items without looping over\\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\\n // simply set a reasonable maximum list length and decrease the size before we finish.\\n RLPItem[] memory out = new RLPItem[](MAX_LIST_LENGTH);\\n\\n uint256 itemCount = 0;\\n uint256 offset = listOffset;\\n while (offset < _in.length) {\\n (uint256 itemOffset, uint256 itemLength, ) = _decodeLength(\\n RLPItem({\\n length: _in.length - offset,\\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\\n })\\n );\\n\\n // We don't need to check itemCount < out.length explicitly because Solidity already\\n // handles this check on our behalf, we'd just be wasting gas.\\n out[itemCount] = RLPItem({\\n length: itemLength + itemOffset,\\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\\n });\\n\\n itemCount += 1;\\n offset += itemOffset + itemLength;\\n }\\n\\n // Decrease the array size to match the actual item count.\\n assembly {\\n mstore(out, itemCount)\\n }\\n\\n return out;\\n }\\n\\n /**\\n * @notice Reads an RLP list value into a list of RLP items.\\n *\\n * @param _in RLP list value.\\n *\\n * @return Decoded RLP list items.\\n */\\n function readList(bytes memory _in) internal pure returns (RLPItem[] memory) {\\n return readList(toRLPItem(_in));\\n }\\n\\n /**\\n * @notice Reads an RLP bytes value into bytes.\\n *\\n * @param _in RLP bytes value.\\n *\\n * @return Decoded bytes.\\n */\\n function readBytes(RLPItem memory _in) internal pure returns (bytes memory) {\\n (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.DATA_ITEM,\\n \\\"RLPReader: decoded item type for bytes is not a data item\\\"\\n );\\n\\n require(\\n _in.length == itemOffset + itemLength,\\n \\\"RLPReader: bytes value contains an invalid remainder\\\"\\n );\\n\\n return _copy(_in.ptr, itemOffset, itemLength);\\n }\\n\\n /**\\n * @notice Reads an RLP bytes value into bytes.\\n *\\n * @param _in RLP bytes value.\\n *\\n * @return Decoded bytes.\\n */\\n function readBytes(bytes memory _in) internal pure returns (bytes memory) {\\n return readBytes(toRLPItem(_in));\\n }\\n\\n /**\\n * @notice Reads the raw bytes of an RLP item.\\n *\\n * @param _in RLP item to read.\\n *\\n * @return Raw RLP bytes.\\n */\\n function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory) {\\n return _copy(_in.ptr, 0, _in.length);\\n }\\n\\n /**\\n * @notice Decodes the length of an RLP item.\\n *\\n * @param _in RLP item to decode.\\n *\\n * @return Offset of the encoded data.\\n * @return Length of the encoded data.\\n * @return RLP item type (LIST_ITEM or DATA_ITEM).\\n */\\n function _decodeLength(RLPItem memory _in)\\n private\\n pure\\n returns (\\n uint256,\\n uint256,\\n RLPItemType\\n )\\n {\\n // Short-circuit if there's nothing to decode, note that we perform this check when\\n // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass\\n // that function and create an RLP item directly. So we need to check this anyway.\\n require(\\n _in.length > 0,\\n \\\"RLPReader: length of an RLP item must be greater than zero to be decodable\\\"\\n );\\n\\n MemoryPointer ptr = _in.ptr;\\n uint256 prefix;\\n assembly {\\n prefix := byte(0, mload(ptr))\\n }\\n\\n if (prefix <= 0x7f) {\\n // Single byte.\\n return (0, 1, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xb7) {\\n // Short string.\\n\\n // slither-disable-next-line variable-scope\\n uint256 strLen = prefix - 0x80;\\n\\n require(\\n _in.length > strLen,\\n \\\"RLPReader: length of content must be greater than string length (short string)\\\"\\n );\\n\\n bytes1 firstByteOfContent;\\n assembly {\\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\\n }\\n\\n require(\\n strLen != 1 || firstByteOfContent >= 0x80,\\n \\\"RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)\\\"\\n );\\n\\n return (1, strLen, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xbf) {\\n // Long string.\\n uint256 lenOfStrLen = prefix - 0xb7;\\n\\n require(\\n _in.length > lenOfStrLen,\\n \\\"RLPReader: length of content must be > than length of string length (long string)\\\"\\n );\\n\\n bytes1 firstByteOfContent;\\n assembly {\\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\\n }\\n\\n require(\\n firstByteOfContent != 0x00,\\n \\\"RLPReader: length of content must not have any leading zeros (long string)\\\"\\n );\\n\\n uint256 strLen;\\n assembly {\\n strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1)))\\n }\\n\\n require(\\n strLen > 55,\\n \\\"RLPReader: length of content must be greater than 55 bytes (long string)\\\"\\n );\\n\\n require(\\n _in.length > lenOfStrLen + strLen,\\n \\\"RLPReader: length of content must be greater than total length (long string)\\\"\\n );\\n\\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xf7) {\\n // Short list.\\n // slither-disable-next-line variable-scope\\n uint256 listLen = prefix - 0xc0;\\n\\n require(\\n _in.length > listLen,\\n \\\"RLPReader: length of content must be greater than list length (short list)\\\"\\n );\\n\\n return (1, listLen, RLPItemType.LIST_ITEM);\\n } else {\\n // Long list.\\n uint256 lenOfListLen = prefix - 0xf7;\\n\\n require(\\n _in.length > lenOfListLen,\\n \\\"RLPReader: length of content must be > than length of list length (long list)\\\"\\n );\\n\\n bytes1 firstByteOfContent;\\n assembly {\\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\\n }\\n\\n require(\\n firstByteOfContent != 0x00,\\n \\\"RLPReader: length of content must not have any leading zeros (long list)\\\"\\n );\\n\\n uint256 listLen;\\n assembly {\\n listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1)))\\n }\\n\\n require(\\n listLen > 55,\\n \\\"RLPReader: length of content must be greater than 55 bytes (long list)\\\"\\n );\\n\\n require(\\n _in.length > lenOfListLen + listLen,\\n \\\"RLPReader: length of content must be greater than total length (long list)\\\"\\n );\\n\\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\\n }\\n }\\n\\n /**\\n * @notice Copies the bytes from a memory location.\\n *\\n * @param _src Pointer to the location to read from.\\n * @param _offset Offset to start reading from.\\n * @param _length Number of bytes to read.\\n *\\n * @return Copied bytes.\\n */\\n function _copy(\\n MemoryPointer _src,\\n uint256 _offset,\\n uint256 _length\\n ) private pure returns (bytes memory) {\\n bytes memory out = new bytes(_length);\\n if (_length == 0) {\\n return out;\\n }\\n\\n // Mostly based on Solidity's copy_memory_to_memory:\\n // solhint-disable max-line-length\\n // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114\\n uint256 src = MemoryPointer.unwrap(_src) + _offset;\\n assembly {\\n let dest := add(out, 32)\\n let i := 0\\n for {\\n\\n } lt(i, _length) {\\n i := add(i, 32)\\n } {\\n mstore(add(dest, i), mload(add(src, i)))\\n }\\n\\n if gt(i, _length) {\\n mstore(add(dest, _length), 0)\\n }\\n }\\n\\n return out;\\n }\\n}\\n\",\"keccak256\":\"0x50763c897f0fe84cb067985ec4d7c5721ce9004a69cf0327f96f8982ee8ca412\",\"license\":\"MIT\"},\"@eth-optimism/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Bytes } from \\\"../Bytes.sol\\\";\\nimport { RLPReader } from \\\"../rlp/RLPReader.sol\\\";\\n\\n/**\\n * @title MerkleTrie\\n * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie\\n * inclusion proofs. By default, this library assumes a hexary trie. One can change the\\n * trie radix constant to support other trie radixes.\\n */\\nlibrary MerkleTrie {\\n /**\\n * @notice Struct representing a node in the trie.\\n *\\n * @custom:field encoded The RLP-encoded node.\\n * @custom:field decoded The RLP-decoded node.\\n */\\n struct TrieNode {\\n bytes encoded;\\n RLPReader.RLPItem[] decoded;\\n }\\n\\n /**\\n * @notice Determines the number of elements per branch node.\\n */\\n uint256 internal constant TREE_RADIX = 16;\\n\\n /**\\n * @notice Branch nodes have TREE_RADIX elements and one value element.\\n */\\n uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;\\n\\n /**\\n * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`.\\n */\\n uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;\\n\\n /**\\n * @notice Prefix for even-nibbled extension node paths.\\n */\\n uint8 internal constant PREFIX_EXTENSION_EVEN = 0;\\n\\n /**\\n * @notice Prefix for odd-nibbled extension node paths.\\n */\\n uint8 internal constant PREFIX_EXTENSION_ODD = 1;\\n\\n /**\\n * @notice Prefix for even-nibbled leaf node paths.\\n */\\n uint8 internal constant PREFIX_LEAF_EVEN = 2;\\n\\n /**\\n * @notice Prefix for odd-nibbled leaf node paths.\\n */\\n uint8 internal constant PREFIX_LEAF_ODD = 3;\\n\\n /**\\n * @notice Verifies a proof that a given key/value pair is present in the trie.\\n *\\n * @param _key Key of the node to search for, as a hex string.\\n * @param _value Value of the node to search for, as a hex string.\\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\\n * nodes that make a path down to the target node.\\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\\n * correctly constructed.\\n *\\n * @return Whether or not the proof is valid.\\n */\\n function verifyInclusionProof(\\n bytes memory _key,\\n bytes memory _value,\\n bytes[] memory _proof,\\n bytes32 _root\\n ) internal pure returns (bool) {\\n return Bytes.equal(_value, get(_key, _proof, _root));\\n }\\n\\n /**\\n * @notice Retrieves the value associated with a given key.\\n *\\n * @param _key Key to search for, as hex bytes.\\n * @param _proof Merkle trie inclusion proof for the key.\\n * @param _root Known root of the Merkle trie.\\n *\\n * @return Value of the key if it exists.\\n */\\n function get(\\n bytes memory _key,\\n bytes[] memory _proof,\\n bytes32 _root\\n ) internal pure returns (bytes memory) {\\n require(_key.length > 0, \\\"MerkleTrie: empty key\\\");\\n\\n TrieNode[] memory proof = _parseProof(_proof);\\n bytes memory key = Bytes.toNibbles(_key);\\n bytes memory currentNodeID = abi.encodePacked(_root);\\n uint256 currentKeyIndex = 0;\\n\\n // Proof is top-down, so we start at the first element (root).\\n for (uint256 i = 0; i < proof.length; i++) {\\n TrieNode memory currentNode = proof[i];\\n\\n // Key index should never exceed total key length or we'll be out of bounds.\\n require(\\n currentKeyIndex <= key.length,\\n \\\"MerkleTrie: key index exceeds total key length\\\"\\n );\\n\\n if (currentKeyIndex == 0) {\\n // First proof element is always the root node.\\n require(\\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\\n \\\"MerkleTrie: invalid root hash\\\"\\n );\\n } else if (currentNode.encoded.length >= 32) {\\n // Nodes 32 bytes or larger are hashed inside branch nodes.\\n require(\\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\\n \\\"MerkleTrie: invalid large internal hash\\\"\\n );\\n } else {\\n // Nodes smaller than 32 bytes aren't hashed.\\n require(\\n Bytes.equal(currentNode.encoded, currentNodeID),\\n \\\"MerkleTrie: invalid internal node hash\\\"\\n );\\n }\\n\\n if (currentNode.decoded.length == BRANCH_NODE_LENGTH) {\\n if (currentKeyIndex == key.length) {\\n // Value is the last element of the decoded list (for branch nodes). There's\\n // some ambiguity in the Merkle trie specification because bytes(0) is a\\n // valid value to place into the trie, but for branch nodes bytes(0) can exist\\n // even when the value wasn't explicitly placed there. Geth treats a value of\\n // bytes(0) as \\\"key does not exist\\\" and so we do the same.\\n bytes memory value = RLPReader.readBytes(currentNode.decoded[TREE_RADIX]);\\n require(\\n value.length > 0,\\n \\\"MerkleTrie: value length must be greater than zero (branch)\\\"\\n );\\n\\n // Extra proof elements are not allowed.\\n require(\\n i == proof.length - 1,\\n \\\"MerkleTrie: value node must be last node in proof (branch)\\\"\\n );\\n\\n return value;\\n } else {\\n // We're not at the end of the key yet.\\n // Figure out what the next node ID should be and continue.\\n uint8 branchKey = uint8(key[currentKeyIndex]);\\n RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];\\n currentNodeID = _getNodeID(nextNode);\\n currentKeyIndex += 1;\\n }\\n } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {\\n bytes memory path = _getNodePath(currentNode);\\n uint8 prefix = uint8(path[0]);\\n uint8 offset = 2 - (prefix % 2);\\n bytes memory pathRemainder = Bytes.slice(path, offset);\\n bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex);\\n uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);\\n\\n // Whether this is a leaf node or an extension node, the path remainder MUST be a\\n // prefix of the key remainder (or be equal to the key remainder) or the proof is\\n // considered invalid.\\n require(\\n pathRemainder.length == sharedNibbleLength,\\n \\\"MerkleTrie: path remainder must share all nibbles with key\\\"\\n );\\n\\n if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {\\n // Prefix of 2 or 3 means this is a leaf node. For the leaf node to be valid,\\n // the key remainder must be exactly equal to the path remainder. We already\\n // did the necessary byte comparison, so it's more efficient here to check that\\n // the key remainder length equals the shared nibble length, which implies\\n // equality with the path remainder (since we already did the same check with\\n // the path remainder and the shared nibble length).\\n require(\\n keyRemainder.length == sharedNibbleLength,\\n \\\"MerkleTrie: key remainder must be identical to path remainder\\\"\\n );\\n\\n // Our Merkle Trie is designed specifically for the purposes of the Ethereum\\n // state trie. Empty values are not allowed in the state trie, so we can safely\\n // say that if the value is empty, the key should not exist and the proof is\\n // invalid.\\n bytes memory value = RLPReader.readBytes(currentNode.decoded[1]);\\n require(\\n value.length > 0,\\n \\\"MerkleTrie: value length must be greater than zero (leaf)\\\"\\n );\\n\\n // Extra proof elements are not allowed.\\n require(\\n i == proof.length - 1,\\n \\\"MerkleTrie: value node must be last node in proof (leaf)\\\"\\n );\\n\\n return value;\\n } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {\\n // Prefix of 0 or 1 means this is an extension node. We move onto the next node\\n // in the proof and increment the key index by the length of the path remainder\\n // which is equal to the shared nibble length.\\n currentNodeID = _getNodeID(currentNode.decoded[1]);\\n currentKeyIndex += sharedNibbleLength;\\n } else {\\n revert(\\\"MerkleTrie: received a node with an unknown prefix\\\");\\n }\\n } else {\\n revert(\\\"MerkleTrie: received an unparseable node\\\");\\n }\\n }\\n\\n revert(\\\"MerkleTrie: ran out of proof elements\\\");\\n }\\n\\n /**\\n * @notice Parses an array of proof elements into a new array that contains both the original\\n * encoded element and the RLP-decoded element.\\n *\\n * @param _proof Array of proof elements to parse.\\n *\\n * @return Proof parsed into easily accessible structs.\\n */\\n function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) {\\n uint256 length = _proof.length;\\n TrieNode[] memory proof = new TrieNode[](length);\\n for (uint256 i = 0; i < length; ) {\\n proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) });\\n unchecked {\\n ++i;\\n }\\n }\\n return proof;\\n }\\n\\n /**\\n * @notice Picks out the ID for a node. Node ID is referred to as the \\\"hash\\\" within the\\n * specification, but nodes < 32 bytes are not actually hashed.\\n *\\n * @param _node Node to pull an ID for.\\n *\\n * @return ID for the node, depending on the size of its contents.\\n */\\n function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) {\\n return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node);\\n }\\n\\n /**\\n * @notice Gets the path for a leaf or extension node.\\n *\\n * @param _node Node to get a path for.\\n *\\n * @return Node path, converted to an array of nibbles.\\n */\\n function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) {\\n return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0]));\\n }\\n\\n /**\\n * @notice Utility; determines the number of nibbles shared between two nibble arrays.\\n *\\n * @param _a First nibble array.\\n * @param _b Second nibble array.\\n *\\n * @return Number of shared nibbles.\\n */\\n function _getSharedNibbleLength(bytes memory _a, bytes memory _b)\\n private\\n pure\\n returns (uint256)\\n {\\n uint256 shared;\\n uint256 max = (_a.length < _b.length) ? _a.length : _b.length;\\n for (; shared < max && _a[shared] == _b[shared]; ) {\\n unchecked {\\n ++shared;\\n }\\n }\\n return shared;\\n }\\n}\\n\",\"keccak256\":\"0xd27fc945d6dd2821636d840f3766f817823c8e9fbfdb87c2da7c73e4292d2f7f\",\"license\":\"MIT\"},\"@eth-optimism/contracts-bedrock/contracts/libraries/trie/SecureMerkleTrie.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/* Library Imports */\\nimport { MerkleTrie } from \\\"./MerkleTrie.sol\\\";\\n\\n/**\\n * @title SecureMerkleTrie\\n * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input\\n * keys. Ethereum's state trie hashes input keys before storing them.\\n */\\nlibrary SecureMerkleTrie {\\n /**\\n * @notice Verifies a proof that a given key/value pair is present in the Merkle trie.\\n *\\n * @param _key Key of the node to search for, as a hex string.\\n * @param _value Value of the node to search for, as a hex string.\\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\\n * nodes that make a path down to the target node.\\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\\n * correctly constructed.\\n *\\n * @return Whether or not the proof is valid.\\n */\\n function verifyInclusionProof(\\n bytes memory _key,\\n bytes memory _value,\\n bytes[] memory _proof,\\n bytes32 _root\\n ) internal pure returns (bool) {\\n bytes memory key = _getSecureKey(_key);\\n return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);\\n }\\n\\n /**\\n * @notice Retrieves the value associated with a given key.\\n *\\n * @param _key Key to search for, as hex bytes.\\n * @param _proof Merkle trie inclusion proof for the key.\\n * @param _root Known root of the Merkle trie.\\n *\\n * @return Value of the key if it exists.\\n */\\n function get(\\n bytes memory _key,\\n bytes[] memory _proof,\\n bytes32 _root\\n ) internal pure returns (bytes memory) {\\n bytes memory key = _getSecureKey(_key);\\n return MerkleTrie.get(key, _proof, _root);\\n }\\n\\n /**\\n * @notice Computes the hashed version of the input key.\\n *\\n * @param _key Key to hash.\\n *\\n * @return Hashed version of the key.\\n */\\n function _getSecureKey(bytes memory _key) private pure returns (bytes memory) {\\n return abi.encodePacked(keccak256(_key));\\n }\\n}\\n\",\"keccak256\":\"0x61b03a03779cb1f75cea3b88af16fdfd10629029b4b2d6be5238e71af8ef1b5f\",\"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/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/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/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.3) (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. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(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\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"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\"},\"contracts/SonneMerkleDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\\nimport '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport {SecureMerkleTrie} from '@eth-optimism/contracts-bedrock/contracts/libraries/trie/SecureMerkleTrie.sol';\\nimport {RLPReader} from '@eth-optimism/contracts-bedrock/contracts/libraries/rlp/RLPReader.sol';\\nimport {ISonneMerkleDistributor} from './interfaces/ISonneMerkleDistributor.sol';\\n\\n/// @title Sonne Finance Merkle tree-based rewards distributor\\n/// @notice Contract to distribute rewards on BASE network to Sonne Finance Optimism stakers\\ncontract SonneMerkleDistributor is\\n Initializable,\\n ReentrancyGuardUpgradeable,\\n AccessControlUpgradeable,\\n ISonneMerkleDistributor\\n{\\n using SafeERC20 for IERC20;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE');\\n bytes32 public constant FUNDS_ROLE = keccak256('FUNDS_ROLE');\\n\\n struct Reward {\\n uint256 balance; // amount of reward tokens held in this reward\\n bytes32 merkleRoot; // root of claims merkle tree\\n uint256 withdrawUnlockTime; // time after which owner can withdraw remaining rewards\\n uint256 ratio; // ratio of rewards to be distributed per one staked token on OP\\n mapping(bytes32 => bool) leafClaimed; // mapping of leafes that already claimed\\n }\\n\\n IERC20 public rewardToken;\\n uint256[] public rewards; // a list of all rewards\\n\\n mapping(uint256 => Reward) public Rewards; // mapping between blockNumber => Reward\\n mapping(address => address) public delegatorAddresses;\\n\\n /// mapping to allow msg.sender to claim on behalf of a delegators address\\n\\n /// @notice Contract constructor to initialize rewardToken\\n /// @param _rewardToken The reward token to be distributed\\n function initialize(IERC20 _rewardToken) external initializer {\\n __ReentrancyGuard_init();\\n __AccessControl_init();\\n\\n require(address(_rewardToken) != address(0), 'Token cannot be zero');\\n rewardToken = _rewardToken;\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _grantRole(MANAGER_ROLE, msg.sender);\\n _grantRole(FUNDS_ROLE, msg.sender);\\n }\\n\\n /// @notice Sets a delegator address for a given recipient\\n /// @param _recipient original eligible recipient address\\n /// @param _delegator The address that sould claim on behalf of the owner\\n function setDelegator(address _recipient, address _delegator) external onlyRole(MANAGER_ROLE) {\\n require(_recipient != address(0) && _delegator != address(0), 'Invalid address provided');\\n delegatorAddresses[_delegator] = _recipient;\\n }\\n\\n /// @notice Creates a new Reward struct for a rewards distribution\\n /// @param amount The amount of reward tokens to deposit\\n /// @param merkleRoot The merkle root of the distribution tree\\n /// @param blockNumber The block number for the Reward\\n /// @param withdrawUnlockTime The timestamp after which withdrawals by owner are allowed\\n /// @param totalStakedBalance Total staked balance of the merkleRoot (computed off-chain)\\n function addReward(\\n uint256 amount,\\n bytes32 merkleRoot,\\n uint256 blockNumber,\\n uint256 withdrawUnlockTime,\\n uint256 totalStakedBalance\\n ) external onlyRole(MANAGER_ROLE) {\\n require(merkleRoot != bytes32(0), 'Merkle root cannot be zero');\\n\\n // creates a new reward struct tied to the blocknumber the merkleProof was created at\\n Reward storage reward = Rewards[blockNumber];\\n\\n require(reward.merkleRoot == bytes32(0), 'Merkle root was already posted');\\n uint256 balance = rewardToken.balanceOf(msg.sender);\\n require(amount > 0 && amount <= balance, 'Invalid amount or insufficient balance');\\n\\n // transfer rewardToken from the distributor to the contract\\n rewardToken.safeTransferFrom(msg.sender, address(this), amount);\\n\\n // record Reward in stable storage\\n reward.balance = amount;\\n reward.merkleRoot = merkleRoot;\\n reward.withdrawUnlockTime = withdrawUnlockTime;\\n reward.ratio = (amount * 1e36) / (totalStakedBalance);\\n rewards.push(blockNumber);\\n emit NewMerkle(msg.sender, address(rewardToken), amount, merkleRoot, blockNumber, withdrawUnlockTime);\\n }\\n\\n /// @notice Allows to withdraw available funds to owner after unlock time\\n /// @param blockNumber The block number for the Reward\\n /// @param amount The amount to withdraw\\n function withdrawFunds(uint256 blockNumber, uint256 amount) external onlyRole(FUNDS_ROLE) {\\n Reward storage reward = Rewards[blockNumber];\\n require(block.timestamp >= reward.withdrawUnlockTime, 'Rewards may not be withdrawn');\\n require(amount <= reward.balance, 'Insufficient balance');\\n\\n // update Rewards record\\n reward.balance = reward.balance -= amount;\\n\\n // transfer rewardToken back to owner\\n rewardToken.safeTransfer(msg.sender, amount);\\n emit MerkleFundUpdate(msg.sender, reward.merkleRoot, blockNumber, amount, true);\\n }\\n\\n /// @notice Claims the specified amount for an account if valid\\n /// @dev Checks proofs and claims tracking before transferring rewardTokens\\n /// @param blockNumber The block number for the Reward\\n /// @param proof The merkle proof for the claim\\n function claim(uint256 blockNumber, bytes[] calldata proof) external nonReentrant {\\n Reward storage reward = Rewards[blockNumber];\\n require(reward.merkleRoot != bytes32(0), 'Reward not found');\\n\\n // Check if the delegatorAddresses includes the account\\n // The delegatorAddresses mapping allows for an account to delegate its claim ability to another address\\n // This can be useful in scenarios where the target recipient might not have the ability to directly interact\\n // with the BASE network contract (e.g. a smart contract with a different address)\\n address recipient = delegatorAddresses[msg.sender] != address(0) ? delegatorAddresses[msg.sender] : msg.sender;\\n\\n // Assuming slotNr is 2 as per your previous function\\n bytes32 key = keccak256(abi.encode(recipient, uint256(2)));\\n\\n //Get the amount of the key from the merkel tree\\n uint256 amount = _getValueFromMerkleTree(reward.merkleRoot, key, proof);\\n\\n // calculate the reward based on the ratio\\n uint256 rewardAmount = (amount * reward.ratio) / 1e36; // TODO check if there is a loss of precision possible here\\n\\n require(reward.balance >= rewardAmount, 'Claim under-funded by funder.');\\n require(Rewards[blockNumber].leafClaimed[key] == false, 'Already claimed');\\n\\n // marks the leaf as claimed\\n reward.leafClaimed[key] = true;\\n\\n // Subtract the rewardAmount, not the amount\\n reward.balance = reward.balance - rewardAmount;\\n\\n //Send reward tokens to the recipient\\n rewardToken.safeTransfer(msg.sender, rewardAmount);\\n\\n emit MerkleClaim(recipient, address(rewardToken), blockNumber, rewardAmount);\\n }\\n\\n /// @notice Checks if a claim is valid and claimable\\n /// @param blockNumber The block number for the Reward\\n /// @param account The address of the account claiming\\n /// @param proof The merkle proof for the claim\\n /// @return A bool indicating if the claim is valid and claimable\\n function isClaimable(uint256 blockNumber, address account, bytes[] calldata proof) external view returns (bool) {\\n bytes32 merkleRoot = Rewards[blockNumber].merkleRoot;\\n\\n // At the staking contract, the balances are stored in a mapping (address => uint256) at storage slot 2\\n bytes32 leaf = keccak256(abi.encode(account, uint256(2)));\\n\\n if (merkleRoot == 0) return false;\\n return !Rewards[blockNumber].leafClaimed[leaf] && _getValueFromMerkleTree(merkleRoot, leaf, proof) > 0;\\n }\\n\\n /// @dev Uses SecureMerkleTrie Library to extract the value from the Merkle proof provided by the user\\n /// @param merkleRoot the merkle root\\n /// @param key the key of the leaf => keccak256(address,2)\\n /// @return result The converted uint256 value as stored in the slot on OP\\n function _getValueFromMerkleTree(\\n bytes32 merkleRoot,\\n bytes32 key,\\n bytes[] calldata proof\\n ) internal pure returns (uint256 result) {\\n // Uses SecureMerkleTrie Library to extract the value from the Merkle proof provided by the user\\n // Reverts if Merkle proof verification fails\\n bytes memory data = RLPReader.readBytes(SecureMerkleTrie.get(abi.encodePacked(key), proof, merkleRoot));\\n\\n for (uint256 i = 0; i < data.length; i++) {\\n result = result * 256 + uint8(data[i]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13752fd9e9fdc22982943bb9e413b9fe7cb41fd00226e2b3a9db98277c365a54\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/ISonneMerkleDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface ISonneMerkleDistributor {\\n event NewMerkle(\\n address indexed creator,\\n address indexed rewardToken,\\n uint256 amount,\\n bytes32 indexed merkleRoot,\\n uint256 blockNr,\\n uint256 withdrawUnlockTime\\n );\\n event MerkleFundUpdate(\\n address indexed funder,\\n bytes32 indexed merkleRoot,\\n uint256 blockNr,\\n uint256 amount,\\n bool withdrawal\\n );\\n event MerkleClaim(address indexed claimer, address indexed rewardToken, uint256 indexed blockNr, uint256 amount);\\n\\n function rewardToken() external view returns (IERC20);\\n\\n function Rewards(\\n uint256 blockNumber\\n ) external view returns (uint256 balance, bytes32 merkleRoot, uint256 withdrawUnlockTime, uint256 ratio);\\n\\n function delegatorAddresses(address _delegator) external view returns (address originalRecipient);\\n\\n function setDelegator(address _recipient, address _delegator) external;\\n\\n function addReward(\\n uint256 amount,\\n bytes32 merkleRoot,\\n uint256 blockNumber,\\n uint256 withdrawUnlockTime,\\n uint256 totalStakedBalance\\n ) external;\\n\\n function withdrawFunds(uint256 blockNumber, uint256 amount) external;\\n\\n function claim(uint256 blockNumber, bytes[] calldata proof) external;\\n\\n function isClaimable(uint256 blockNumber, address account, bytes[] calldata proof) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa6ea729a26b7d515f1f4c9732a955d84253d5c57f68d40d0441f82c0955816a\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50613915806100206000396000f3fe608060405234801561001057600080fd5b50600436106101505760003560e01c80639366452c116100cd578063e525310511610081578063f301af4211610066578063f301af421461032b578063f7c618c11461033e578063f8738c251461035157600080fd5b8063e5253105146102f1578063ec87621c1461030457600080fd5b8063a217fddf116100b2578063a217fddf146102c3578063c4d66de8146102cb578063d547741f146102de57600080fd5b80639366452c146102895780639b87ab6d1461029c57600080fd5b80632f2ff15d1161012457806341f891a41161010957806341f891a4146101fc5780636d46379b1461023d57806391d148541461025057600080fd5b80632f2ff15d146101d657806336568abe146101e957600080fd5b8062501e281461015557806301ffc9a71461016a5780631ce92be514610192578063248a9ca3146101a5575b600080fd5b6101686101633660046133a8565b6103a6565b005b61017d6101783660046133f4565b61062b565b60405190151581526020015b60405180910390f35b6101686101a0366004613433565b610694565b6101c86101b336600461346c565b60009081526097602052604090206001015490565b604051908152602001610189565b6101686101e4366004613485565b610768565b6101686101f7366004613485565b61078d565b61022561020a3660046134aa565b60cc602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610189565b61017d61024b3660046134c7565b610819565b61017d61025e366004613485565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610168610297366004613523565b6108b3565b6101c87f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c281565b6101c8600081565b6101686102d93660046134aa565b610b77565b6101686102ec366004613485565b610d7c565b6101686102ff36600461355e565b610da1565b6101c87f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b6101c861033936600461346c565b610f02565b60c954610225906001600160a01b031681565b61038661035f36600461346c565b60cb6020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610189565b6103ae610f23565b600083815260cb6020526040902060018101546104125760405162461bcd60e51b815260206004820152601060248201527f526577617264206e6f7420666f756e640000000000000000000000000000000060448201526064015b60405180910390fd5b33600090815260cc60205260408120546001600160a01b0316610435573361044f565b33600090815260cc60205260409020546001600160a01b03165b604080516001600160a01b0383166020820152600291810191909152909150600090606001604051602081830303815290604052805190602001209050600061049e8460010154838888610f7c565b905060006ec097ce7bc90715b34b9f10000000008560030154836104c29190613596565b6104cc91906135c3565b905080856000015410156105225760405162461bcd60e51b815260206004820152601d60248201527f436c61696d20756e6465722d66756e6465642062792066756e6465722e0000006044820152606401610409565b600088815260cb6020908152604080832086845260040190915290205460ff161561058f5760405162461bcd60e51b815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152606401610409565b60008381526004860160205260409020805460ff1916600117905584546105b79082906135d7565b855560c9546105d0906001600160a01b03163383611019565b60c95460405182815289916001600160a01b0390811691908716907fceea116ca90ae38b5f3bcd7482763d0bdd5915faed2146d37b1e3bcd1ea425379060200160405180910390a4505050505061062660018055565b505050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061068e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086106be816110b0565b6001600160a01b038316158015906106de57506001600160a01b03821615155b61072a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420616464726573732070726f766964656400000000000000006044820152606401610409565b506001600160a01b03908116600090815260cc6020526040902080549190921673ffffffffffffffffffffffffffffffffffffffff19909116179055565b600082815260976020526040902060010154610783816110b0565b61062683836110bd565b6001600160a01b038116331461080b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610409565b610815828261115f565b5050565b600084815260cb602090815260408083206001015481516001600160a01b0388168185015260028184015282518082038401815260609091019092528151919092012081830361086e576000925050506108ab565b600087815260cb6020908152604080832084845260040190915290205460ff161580156108a6575060006108a483838888610f7c565b115b925050505b949350505050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086108dd816110b0565b8461092a5760405162461bcd60e51b815260206004820152601a60248201527f4d65726b6c6520726f6f742063616e6e6f74206265207a65726f0000000000006044820152606401610409565b600084815260cb6020526040902060018101541561098a5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6520726f6f742077617320616c726561647920706f7374656400006044820152606401610409565b60c9546040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1091906135ea565b9050600088118015610a225750808811155b610a945760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420616d6f756e74206f7220696e73756666696369656e74206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610409565b60c954610aac906001600160a01b031633308b6111e2565b878255600182018790556002820185905583610ad7896ec097ce7bc90715b34b9f1000000000613596565b610ae191906135c3565b600383015560ca80546001810182556000919091527f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee10186905560c954604080518a81526020810189905290810187905288916001600160a01b03169033907f4993e379e2a0a87975314480436d8f2de32d291a64892cb63cdb0839d09044369060600160405180910390a45050505050505050565b600054610100900460ff1615808015610b975750600054600160ff909116105b80610bb15750303b158015610bb1575060005460ff166001145b610c235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610409565b6000805460ff191660011790558015610c46576000805461ff0019166101001790555b610c4e611239565b610c566112ae565b6001600160a01b038216610cac5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e2063616e6e6f74206265207a65726f0000000000000000000000006044820152606401610409565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416179055610cdf6000336110bd565b610d097f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08336110bd565b610d337f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2336110bd565b8015610815576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260976020526040902060010154610d97816110b0565b610626838361115f565b7f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2610dcb816110b0565b600083815260cb602052604090206002810154421015610e2d5760405162461bcd60e51b815260206004820152601c60248201527f52657761726473206d6179206e6f742062652077697468647261776e000000006044820152606401610409565b8054831115610e7e5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610409565b82816000016000828254610e9291906135d7565b918290555082555060c954610eb1906001600160a01b03163385611019565b6001808201546040805187815260208101879052908101929092529033907f210aece5a2bb3ac8bbec4d3bd83444123ef037a899b89d617e735799f983e6b39060600160405180910390a350505050565b60ca8181548110610f1257600080fd5b600091825260209091200154905081565b600260015403610f755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610409565b6002600155565b600080610fbd610fb886604051602001610f9891815260200190565b60408051601f19818403018152919052610fb2868861364a565b89611319565b61133e565b905060005b815181101561100f57818181518110610fdd57610fdd61371f565b016020015160f81c610ff184610100613596565b610ffb9190613735565b92508061100781613748565b915050610fc2565b5050949350505050565b6040516001600160a01b0383166024820152604481018290526106269084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152611351565b60018055565b6110ba8133611439565b50565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155760008281526097602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561111b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff16156108155760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516001600160a01b03808516602483015283166044820152606481018290526112339085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161105e565b50505050565b600054610100900460ff166112a45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6112ac6114ae565b565b600054610100900460ff166112ac5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060600061132685611519565b905061133381858561154b565b9150505b9392505050565b606061068e61134c83611e67565b611f23565b60006113a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120589092919063ffffffff16565b90508051600014806113c75750808060200190518101906113c79190613761565b6106265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610409565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155761146c81612067565b611477836020612079565b6040516020016114889291906137a7565b60408051601f198184030181529082905262461bcd60e51b825261040991600401613828565b600054610100900460ff166110aa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060818051906020012060405160200161153591815260200190565b6040516020818303038152906040529050919050565b6060600084511161159e5760405162461bcd60e51b815260206004820152601560248201527f4d65726b6c65547269653a20656d707479206b657900000000000000000000006044820152606401610409565b60006115a98461225a565b905060006115b686612349565b90506000846040516020016115cd91815260200190565b60405160208183030381529060405290506000805b8451811015611df85760008582815181106115ff576115ff61371f565b6020026020010151905084518311156116805760405162461bcd60e51b815260206004820152602e60248201527f4d65726b6c65547269653a206b657920696e646578206578636565647320746f60448201527f74616c206b6579206c656e6774680000000000000000000000000000000000006064820152608401610409565b8260000361171f57805180516020918201206040516116ce926116a892910190815260200190565b604051602081830303815290604052858051602091820120825192909101919091201490565b61171a5760405162461bcd60e51b815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f7420686173680000006044820152606401610409565b611842565b8051516020116117bb5780518051602091820120604051611749926116a892910190815260200190565b61171a5760405162461bcd60e51b815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c2068617368000000000000000000000000000000000000000000000000006064820152608401610409565b8051845160208087019190912082519190920120146118425760405162461bcd60e51b815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f65206861736800000000000000000000000000000000000000000000000000006064820152608401610409565b61184e60106001613735565b816020015151036119fb578451830361199357600061188a826020015160108151811061187d5761187d61371f565b6020026020010151611f23565b905060008151116119035760405162461bcd60e51b815260206004820152603b60248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286272616e63682900000000006064820152608401610409565b6001875161191191906135d7565b83146119855760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286272616e6368290000000000006064820152608401610409565b965061133795505050505050565b60008584815181106119a7576119a761371f565b602001015160f81c60f81b60f81c9050600082602001518260ff16815181106119d2576119d261371f565b602002602001015190506119e5816123ac565b95506119f2600186613735565b94505050611de5565b600281602001515103611d77576000611a13826123d1565b9050600081600081518110611a2a57611a2a61371f565b016020015160f81c90506000611a4160028361385b565b611a4c90600261387d565b90506000611a5d848360ff166123f5565b90506000611a6b8a896123f5565b90506000611a79838361242b565b905080835114611af15760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a20706174682072656d61696e646572206d7573742060448201527f736861726520616c6c206e6962626c65732077697468206b65790000000000006064820152608401610409565b60ff851660021480611b06575060ff85166003145b15611cac5780825114611b815760405162461bcd60e51b815260206004820152603d60248201527f4d65726b6c65547269653a206b65792072656d61696e646572206d757374206260448201527f65206964656e746963616c20746f20706174682072656d61696e6465720000006064820152608401610409565b6000611b9d886020015160018151811061187d5761187d61371f565b90506000815111611c165760405162461bcd60e51b815260206004820152603960248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286c65616629000000000000006064820152608401610409565b60018d51611c2491906135d7565b8914611c985760405162461bcd60e51b815260206004820152603860248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286c6561662900000000000000006064820152608401610409565b9c506113379b505050505050505050505050565b60ff85161580611cbf575060ff85166001145b15611cfe57611ceb8760200151600181518110611cde57611cde61371f565b60200260200101516123ac565b9950611cf7818a613735565b9850611d6c565b60405162461bcd60e51b815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e2070726566697800000000000000000000000000006064820152608401610409565b505050505050611de5565b60405162461bcd60e51b815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f64650000000000000000000000000000000000000000000000006064820152608401610409565b5080611df081613748565b9150506115e2565b5060405162461bcd60e51b815260206004820152602560248201527f4d65726b6c65547269653a2072616e206f7574206f662070726f6f6620656c6560448201527f6d656e74730000000000000000000000000000000000000000000000000000006064820152608401610409565b60408051808201909152600080825260208201526000825111611f055760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b50604080518082019091528151815260209182019181019190915290565b60606000806000611f33856124aa565b919450925090506000816001811115611f4e57611f4e613896565b14611fc15760405162461bcd60e51b815260206004820152603960248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206279746573206973206e6f7420612064617461206974656d000000000000006064820152608401610409565b611fcb8284613735565b8551146120405760405162461bcd60e51b815260206004820152603460248201527f524c505265616465723a2062797465732076616c756520636f6e7461696e732060448201527f616e20696e76616c69642072656d61696e6465720000000000000000000000006064820152608401610409565b61204f85602001518484612d6c565b95945050505050565b60606108ab8484600085612e0d565b606061068e6001600160a01b03831660145b60606000612088836002613596565b612093906002613735565b67ffffffffffffffff8111156120ab576120ab613603565b6040519080825280601f01601f1916602001820160405280156120d5576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061210c5761210c61371f565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106121575761215761371f565b60200101906001600160f81b031916908160001a905350600061217b846002613596565b612186906001613735565b90505b600181111561220b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106121c7576121c761371f565b1a60f81b8282815181106121dd576121dd61371f565b60200101906001600160f81b031916908160001a90535060049490941c93612204816138ac565b9050612189565b5083156113375760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610409565b805160609060008167ffffffffffffffff81111561227a5761227a613603565b6040519080825280602002602001820160405280156122bf57816020015b60408051808201909152606080825260208201528152602001906001900390816122985790505b50905060005b828110156123415760405180604001604052808683815181106122ea576122ea61371f565b6020026020010151815260200161231987848151811061230c5761230c61371f565b6020026020010151612ef4565b81525082828151811061232e5761232e61371f565b60209081029190910101526001016122c5565b509392505050565b606080604051905082518060011b603f8101601f1916830160405280835250602084016020830160005b838110156123a1578060011b82018184015160001a8060041c8253600f811660018301535050600101612373565b509295945050505050565b606060208260000151106123c8576123c382611f23565b61068e565b61068e82612f07565b606061068e6123f0836020015160008151811061187d5761187d61371f565b612349565b606082518210612414575060408051602081019091526000815261068e565b611337838384865161242691906135d7565b612f1d565b60008060008351855110612440578351612443565b84515b90505b808210801561249a57508382815181106124625761246261371f565b602001015160f81c60f81b6001600160f81b0319168583815181106124895761248961371f565b01602001516001600160f81b031916145b1561234157816001019150612446565b60008060008084600001511161253b5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b6020840151805160001a607f8111612560576000600160009450945094505050612d65565b60b7811161270a5760006125756080836135d7565b9050808760000151116126165760405162461bcd60e51b815260206004820152604e60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20737472696e67206c656e6774682060648201527f2873686f727420737472696e6729000000000000000000000000000000000000608482015260a401610409565b6001838101516001600160f81b031916908214158061265f57507f80000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610155b6126f75760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a20696e76616c6964207072656669782c2073696e676c60448201527f652062797465203c203078383020617265206e6f74207072656669786564202860648201527f73686f727420737472696e672900000000000000000000000000000000000000608482015260a401610409565b5060019550935060009250612d65915050565b60bf81116129d857600061271f60b7836135d7565b9050808760000151116127c05760405162461bcd60e51b815260206004820152605160248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f6620737472696e67206c656e60648201527f67746820286c6f6e6720737472696e6729000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b031916600081900361286c5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e6720737472696e672900000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c603781116129165760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f20737472696e6729000000000000000000000000000000000000000000000000608482015260a401610409565b6129208184613735565b8951116129bb5760405162461bcd60e51b815260206004820152604c60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e6720737472696e67290000000000000000000000000000000000000000608482015260a401610409565b6129c6836001613735565b9750955060009450612d659350505050565b60f78111612a9f5760006129ed60c0836135d7565b905080876000015111612a8e5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e206c697374206c656e67746820287360648201527f686f7274206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b600195509350849250612d65915050565b6000612aac60f7836135d7565b905080876000015111612b4d5760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f66206c697374206c656e677460648201527f6820286c6f6e67206c6973742900000000000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b0319166000819003612bf95760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e67206c69737429000000000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c60378111612ca35760405162461bcd60e51b815260206004820152604660248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f206c697374290000000000000000000000000000000000000000000000000000608482015260a401610409565b612cad8184613735565b895111612d485760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e67206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b612d53836001613735565b9750955060019450612d659350505050565b9193909250565b606060008267ffffffffffffffff811115612d8957612d89613603565b6040519080825280601f01601f191660200182016040528015612db3576020820181803683370190505b50905082600003612dc5579050611337565b6000612dd18587613735565b90506020820160005b85811015612df2578281015182820152602001612dda565b85811115612e01576000868301525b50919695505050505050565b606082471015612e855760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610409565b600080866001600160a01b03168587604051612ea191906138c3565b60006040518083038185875af1925050503d8060008114612ede576040519150601f19603f3d011682016040523d82523d6000602084013e612ee3565b606091505b50915091506108a687838387613089565b606061068e612f0283611e67565b613102565b606061068e826020015160008460000151612d6c565b60608182601f011015612f725760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b828284011015612fc45760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b818301845110156130175760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610409565b6060821580156130365760405191506000825260208201604052613080565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561306f578051835260209283019201613057565b5050858452601f01601f1916604052505b50949350505050565b606083156130f85782516000036130f1576001600160a01b0385163b6130f15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610409565b50816108ab565b6108ab8383613332565b60606000806000613112856124aa565b91945092509050600181600181111561312d5761312d613896565b146131a05760405162461bcd60e51b815260206004820152603860248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206c697374206973206e6f742061206c697374206974656d00000000000000006064820152608401610409565b84516131ac8385613735565b1461321f5760405162461bcd60e51b815260206004820152603260248201527f524c505265616465723a206c697374206974656d2068617320616e20696e766160448201527f6c696420646174612072656d61696e64657200000000000000000000000000006064820152608401610409565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816132385790505090506000845b8751811015613326576000806132ab6040518060400160405280858d6000015161328f91906135d7565b8152602001858d602001516132a49190613735565b90526124aa565b5091509150604051806040016040528083836132c79190613735565b8152602001848c602001516132dc9190613735565b8152508585815181106132f1576132f161371f565b6020908102919091010152613307600185613735565b93506133138183613735565b61331d9084613735565b92505050613265565b50815295945050505050565b8151156133425781518083602001fd5b8060405162461bcd60e51b81526004016104099190613828565b60008083601f84011261336e57600080fd5b50813567ffffffffffffffff81111561338657600080fd5b6020830191508360208260051b85010111156133a157600080fd5b9250929050565b6000806000604084860312156133bd57600080fd5b83359250602084013567ffffffffffffffff8111156133db57600080fd5b6133e78682870161335c565b9497909650939450505050565b60006020828403121561340657600080fd5b81356001600160e01b03198116811461133757600080fd5b6001600160a01b03811681146110ba57600080fd5b6000806040838503121561344657600080fd5b82356134518161341e565b915060208301356134618161341e565b809150509250929050565b60006020828403121561347e57600080fd5b5035919050565b6000806040838503121561349857600080fd5b8235915060208301356134618161341e565b6000602082840312156134bc57600080fd5b81356113378161341e565b600080600080606085870312156134dd57600080fd5b8435935060208501356134ef8161341e565b9250604085013567ffffffffffffffff81111561350b57600080fd5b6135178782880161335c565b95989497509550505050565b600080600080600060a0868803121561353b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561357157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761068e5761068e613580565b634e487b7160e01b600052601260045260246000fd5b6000826135d2576135d26135ad565b500490565b8181038181111561068e5761068e613580565b6000602082840312156135fc57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561364257613642613603565b604052919050565b600067ffffffffffffffff8084111561366557613665613603565b8360051b6020613676818301613619565b86815291850191818101903684111561368e57600080fd5b865b84811015613713578035868111156136a85760008081fd5b8801601f36818301126136bb5760008081fd5b8135888111156136cd576136cd613603565b6136de818301601f19168801613619565b915080825236878285010111156136f55760008081fd5b80878401888401376000908201870152845250918301918301613690565b50979650505050505050565b634e487b7160e01b600052603260045260246000fd5b8082018082111561068e5761068e613580565b60006001820161375a5761375a613580565b5060010190565b60006020828403121561377357600080fd5b8151801515811461133757600080fd5b60005b8381101561379e578181015183820152602001613786565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516137df816017850160208801613783565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161381c816028840160208801613783565b01602801949350505050565b6020815260008251806020840152613847816040850160208701613783565b601f01601f19169190910160400192915050565b600060ff83168061386e5761386e6135ad565b8060ff84160691505092915050565b60ff828116828216039081111561068e5761068e613580565b634e487b7160e01b600052602160045260246000fd5b6000816138bb576138bb613580565b506000190190565b600082516138d5818460208701613783565b919091019291505056fea26469706673582212206ee24dc634614d6c6959f24d9ce7efdb5cc31b9c48a186879cff6877a676180f64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101505760003560e01c80639366452c116100cd578063e525310511610081578063f301af4211610066578063f301af421461032b578063f7c618c11461033e578063f8738c251461035157600080fd5b8063e5253105146102f1578063ec87621c1461030457600080fd5b8063a217fddf116100b2578063a217fddf146102c3578063c4d66de8146102cb578063d547741f146102de57600080fd5b80639366452c146102895780639b87ab6d1461029c57600080fd5b80632f2ff15d1161012457806341f891a41161010957806341f891a4146101fc5780636d46379b1461023d57806391d148541461025057600080fd5b80632f2ff15d146101d657806336568abe146101e957600080fd5b8062501e281461015557806301ffc9a71461016a5780631ce92be514610192578063248a9ca3146101a5575b600080fd5b6101686101633660046133a8565b6103a6565b005b61017d6101783660046133f4565b61062b565b60405190151581526020015b60405180910390f35b6101686101a0366004613433565b610694565b6101c86101b336600461346c565b60009081526097602052604090206001015490565b604051908152602001610189565b6101686101e4366004613485565b610768565b6101686101f7366004613485565b61078d565b61022561020a3660046134aa565b60cc602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610189565b61017d61024b3660046134c7565b610819565b61017d61025e366004613485565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610168610297366004613523565b6108b3565b6101c87f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c281565b6101c8600081565b6101686102d93660046134aa565b610b77565b6101686102ec366004613485565b610d7c565b6101686102ff36600461355e565b610da1565b6101c87f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b6101c861033936600461346c565b610f02565b60c954610225906001600160a01b031681565b61038661035f36600461346c565b60cb6020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610189565b6103ae610f23565b600083815260cb6020526040902060018101546104125760405162461bcd60e51b815260206004820152601060248201527f526577617264206e6f7420666f756e640000000000000000000000000000000060448201526064015b60405180910390fd5b33600090815260cc60205260408120546001600160a01b0316610435573361044f565b33600090815260cc60205260409020546001600160a01b03165b604080516001600160a01b0383166020820152600291810191909152909150600090606001604051602081830303815290604052805190602001209050600061049e8460010154838888610f7c565b905060006ec097ce7bc90715b34b9f10000000008560030154836104c29190613596565b6104cc91906135c3565b905080856000015410156105225760405162461bcd60e51b815260206004820152601d60248201527f436c61696d20756e6465722d66756e6465642062792066756e6465722e0000006044820152606401610409565b600088815260cb6020908152604080832086845260040190915290205460ff161561058f5760405162461bcd60e51b815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152606401610409565b60008381526004860160205260409020805460ff1916600117905584546105b79082906135d7565b855560c9546105d0906001600160a01b03163383611019565b60c95460405182815289916001600160a01b0390811691908716907fceea116ca90ae38b5f3bcd7482763d0bdd5915faed2146d37b1e3bcd1ea425379060200160405180910390a4505050505061062660018055565b505050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061068e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086106be816110b0565b6001600160a01b038316158015906106de57506001600160a01b03821615155b61072a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420616464726573732070726f766964656400000000000000006044820152606401610409565b506001600160a01b03908116600090815260cc6020526040902080549190921673ffffffffffffffffffffffffffffffffffffffff19909116179055565b600082815260976020526040902060010154610783816110b0565b61062683836110bd565b6001600160a01b038116331461080b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610409565b610815828261115f565b5050565b600084815260cb602090815260408083206001015481516001600160a01b0388168185015260028184015282518082038401815260609091019092528151919092012081830361086e576000925050506108ab565b600087815260cb6020908152604080832084845260040190915290205460ff161580156108a6575060006108a483838888610f7c565b115b925050505b949350505050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086108dd816110b0565b8461092a5760405162461bcd60e51b815260206004820152601a60248201527f4d65726b6c6520726f6f742063616e6e6f74206265207a65726f0000000000006044820152606401610409565b600084815260cb6020526040902060018101541561098a5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6520726f6f742077617320616c726561647920706f7374656400006044820152606401610409565b60c9546040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1091906135ea565b9050600088118015610a225750808811155b610a945760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420616d6f756e74206f7220696e73756666696369656e74206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610409565b60c954610aac906001600160a01b031633308b6111e2565b878255600182018790556002820185905583610ad7896ec097ce7bc90715b34b9f1000000000613596565b610ae191906135c3565b600383015560ca80546001810182556000919091527f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee10186905560c954604080518a81526020810189905290810187905288916001600160a01b03169033907f4993e379e2a0a87975314480436d8f2de32d291a64892cb63cdb0839d09044369060600160405180910390a45050505050505050565b600054610100900460ff1615808015610b975750600054600160ff909116105b80610bb15750303b158015610bb1575060005460ff166001145b610c235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610409565b6000805460ff191660011790558015610c46576000805461ff0019166101001790555b610c4e611239565b610c566112ae565b6001600160a01b038216610cac5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e2063616e6e6f74206265207a65726f0000000000000000000000006044820152606401610409565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416179055610cdf6000336110bd565b610d097f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08336110bd565b610d337f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2336110bd565b8015610815576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260976020526040902060010154610d97816110b0565b610626838361115f565b7f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2610dcb816110b0565b600083815260cb602052604090206002810154421015610e2d5760405162461bcd60e51b815260206004820152601c60248201527f52657761726473206d6179206e6f742062652077697468647261776e000000006044820152606401610409565b8054831115610e7e5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610409565b82816000016000828254610e9291906135d7565b918290555082555060c954610eb1906001600160a01b03163385611019565b6001808201546040805187815260208101879052908101929092529033907f210aece5a2bb3ac8bbec4d3bd83444123ef037a899b89d617e735799f983e6b39060600160405180910390a350505050565b60ca8181548110610f1257600080fd5b600091825260209091200154905081565b600260015403610f755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610409565b6002600155565b600080610fbd610fb886604051602001610f9891815260200190565b60408051601f19818403018152919052610fb2868861364a565b89611319565b61133e565b905060005b815181101561100f57818181518110610fdd57610fdd61371f565b016020015160f81c610ff184610100613596565b610ffb9190613735565b92508061100781613748565b915050610fc2565b5050949350505050565b6040516001600160a01b0383166024820152604481018290526106269084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152611351565b60018055565b6110ba8133611439565b50565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155760008281526097602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561111b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff16156108155760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516001600160a01b03808516602483015283166044820152606481018290526112339085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161105e565b50505050565b600054610100900460ff166112a45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6112ac6114ae565b565b600054610100900460ff166112ac5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060600061132685611519565b905061133381858561154b565b9150505b9392505050565b606061068e61134c83611e67565b611f23565b60006113a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120589092919063ffffffff16565b90508051600014806113c75750808060200190518101906113c79190613761565b6106265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610409565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155761146c81612067565b611477836020612079565b6040516020016114889291906137a7565b60408051601f198184030181529082905262461bcd60e51b825261040991600401613828565b600054610100900460ff166110aa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060818051906020012060405160200161153591815260200190565b6040516020818303038152906040529050919050565b6060600084511161159e5760405162461bcd60e51b815260206004820152601560248201527f4d65726b6c65547269653a20656d707479206b657900000000000000000000006044820152606401610409565b60006115a98461225a565b905060006115b686612349565b90506000846040516020016115cd91815260200190565b60405160208183030381529060405290506000805b8451811015611df85760008582815181106115ff576115ff61371f565b6020026020010151905084518311156116805760405162461bcd60e51b815260206004820152602e60248201527f4d65726b6c65547269653a206b657920696e646578206578636565647320746f60448201527f74616c206b6579206c656e6774680000000000000000000000000000000000006064820152608401610409565b8260000361171f57805180516020918201206040516116ce926116a892910190815260200190565b604051602081830303815290604052858051602091820120825192909101919091201490565b61171a5760405162461bcd60e51b815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f7420686173680000006044820152606401610409565b611842565b8051516020116117bb5780518051602091820120604051611749926116a892910190815260200190565b61171a5760405162461bcd60e51b815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c2068617368000000000000000000000000000000000000000000000000006064820152608401610409565b8051845160208087019190912082519190920120146118425760405162461bcd60e51b815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f65206861736800000000000000000000000000000000000000000000000000006064820152608401610409565b61184e60106001613735565b816020015151036119fb578451830361199357600061188a826020015160108151811061187d5761187d61371f565b6020026020010151611f23565b905060008151116119035760405162461bcd60e51b815260206004820152603b60248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286272616e63682900000000006064820152608401610409565b6001875161191191906135d7565b83146119855760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286272616e6368290000000000006064820152608401610409565b965061133795505050505050565b60008584815181106119a7576119a761371f565b602001015160f81c60f81b60f81c9050600082602001518260ff16815181106119d2576119d261371f565b602002602001015190506119e5816123ac565b95506119f2600186613735565b94505050611de5565b600281602001515103611d77576000611a13826123d1565b9050600081600081518110611a2a57611a2a61371f565b016020015160f81c90506000611a4160028361385b565b611a4c90600261387d565b90506000611a5d848360ff166123f5565b90506000611a6b8a896123f5565b90506000611a79838361242b565b905080835114611af15760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a20706174682072656d61696e646572206d7573742060448201527f736861726520616c6c206e6962626c65732077697468206b65790000000000006064820152608401610409565b60ff851660021480611b06575060ff85166003145b15611cac5780825114611b815760405162461bcd60e51b815260206004820152603d60248201527f4d65726b6c65547269653a206b65792072656d61696e646572206d757374206260448201527f65206964656e746963616c20746f20706174682072656d61696e6465720000006064820152608401610409565b6000611b9d886020015160018151811061187d5761187d61371f565b90506000815111611c165760405162461bcd60e51b815260206004820152603960248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286c65616629000000000000006064820152608401610409565b60018d51611c2491906135d7565b8914611c985760405162461bcd60e51b815260206004820152603860248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286c6561662900000000000000006064820152608401610409565b9c506113379b505050505050505050505050565b60ff85161580611cbf575060ff85166001145b15611cfe57611ceb8760200151600181518110611cde57611cde61371f565b60200260200101516123ac565b9950611cf7818a613735565b9850611d6c565b60405162461bcd60e51b815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e2070726566697800000000000000000000000000006064820152608401610409565b505050505050611de5565b60405162461bcd60e51b815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f64650000000000000000000000000000000000000000000000006064820152608401610409565b5080611df081613748565b9150506115e2565b5060405162461bcd60e51b815260206004820152602560248201527f4d65726b6c65547269653a2072616e206f7574206f662070726f6f6620656c6560448201527f6d656e74730000000000000000000000000000000000000000000000000000006064820152608401610409565b60408051808201909152600080825260208201526000825111611f055760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b50604080518082019091528151815260209182019181019190915290565b60606000806000611f33856124aa565b919450925090506000816001811115611f4e57611f4e613896565b14611fc15760405162461bcd60e51b815260206004820152603960248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206279746573206973206e6f7420612064617461206974656d000000000000006064820152608401610409565b611fcb8284613735565b8551146120405760405162461bcd60e51b815260206004820152603460248201527f524c505265616465723a2062797465732076616c756520636f6e7461696e732060448201527f616e20696e76616c69642072656d61696e6465720000000000000000000000006064820152608401610409565b61204f85602001518484612d6c565b95945050505050565b60606108ab8484600085612e0d565b606061068e6001600160a01b03831660145b60606000612088836002613596565b612093906002613735565b67ffffffffffffffff8111156120ab576120ab613603565b6040519080825280601f01601f1916602001820160405280156120d5576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061210c5761210c61371f565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106121575761215761371f565b60200101906001600160f81b031916908160001a905350600061217b846002613596565b612186906001613735565b90505b600181111561220b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106121c7576121c761371f565b1a60f81b8282815181106121dd576121dd61371f565b60200101906001600160f81b031916908160001a90535060049490941c93612204816138ac565b9050612189565b5083156113375760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610409565b805160609060008167ffffffffffffffff81111561227a5761227a613603565b6040519080825280602002602001820160405280156122bf57816020015b60408051808201909152606080825260208201528152602001906001900390816122985790505b50905060005b828110156123415760405180604001604052808683815181106122ea576122ea61371f565b6020026020010151815260200161231987848151811061230c5761230c61371f565b6020026020010151612ef4565b81525082828151811061232e5761232e61371f565b60209081029190910101526001016122c5565b509392505050565b606080604051905082518060011b603f8101601f1916830160405280835250602084016020830160005b838110156123a1578060011b82018184015160001a8060041c8253600f811660018301535050600101612373565b509295945050505050565b606060208260000151106123c8576123c382611f23565b61068e565b61068e82612f07565b606061068e6123f0836020015160008151811061187d5761187d61371f565b612349565b606082518210612414575060408051602081019091526000815261068e565b611337838384865161242691906135d7565b612f1d565b60008060008351855110612440578351612443565b84515b90505b808210801561249a57508382815181106124625761246261371f565b602001015160f81c60f81b6001600160f81b0319168583815181106124895761248961371f565b01602001516001600160f81b031916145b1561234157816001019150612446565b60008060008084600001511161253b5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b6020840151805160001a607f8111612560576000600160009450945094505050612d65565b60b7811161270a5760006125756080836135d7565b9050808760000151116126165760405162461bcd60e51b815260206004820152604e60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20737472696e67206c656e6774682060648201527f2873686f727420737472696e6729000000000000000000000000000000000000608482015260a401610409565b6001838101516001600160f81b031916908214158061265f57507f80000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610155b6126f75760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a20696e76616c6964207072656669782c2073696e676c60448201527f652062797465203c203078383020617265206e6f74207072656669786564202860648201527f73686f727420737472696e672900000000000000000000000000000000000000608482015260a401610409565b5060019550935060009250612d65915050565b60bf81116129d857600061271f60b7836135d7565b9050808760000151116127c05760405162461bcd60e51b815260206004820152605160248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f6620737472696e67206c656e60648201527f67746820286c6f6e6720737472696e6729000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b031916600081900361286c5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e6720737472696e672900000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c603781116129165760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f20737472696e6729000000000000000000000000000000000000000000000000608482015260a401610409565b6129208184613735565b8951116129bb5760405162461bcd60e51b815260206004820152604c60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e6720737472696e67290000000000000000000000000000000000000000608482015260a401610409565b6129c6836001613735565b9750955060009450612d659350505050565b60f78111612a9f5760006129ed60c0836135d7565b905080876000015111612a8e5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e206c697374206c656e67746820287360648201527f686f7274206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b600195509350849250612d65915050565b6000612aac60f7836135d7565b905080876000015111612b4d5760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f66206c697374206c656e677460648201527f6820286c6f6e67206c6973742900000000000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b0319166000819003612bf95760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e67206c69737429000000000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c60378111612ca35760405162461bcd60e51b815260206004820152604660248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f206c697374290000000000000000000000000000000000000000000000000000608482015260a401610409565b612cad8184613735565b895111612d485760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e67206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b612d53836001613735565b9750955060019450612d659350505050565b9193909250565b606060008267ffffffffffffffff811115612d8957612d89613603565b6040519080825280601f01601f191660200182016040528015612db3576020820181803683370190505b50905082600003612dc5579050611337565b6000612dd18587613735565b90506020820160005b85811015612df2578281015182820152602001612dda565b85811115612e01576000868301525b50919695505050505050565b606082471015612e855760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610409565b600080866001600160a01b03168587604051612ea191906138c3565b60006040518083038185875af1925050503d8060008114612ede576040519150601f19603f3d011682016040523d82523d6000602084013e612ee3565b606091505b50915091506108a687838387613089565b606061068e612f0283611e67565b613102565b606061068e826020015160008460000151612d6c565b60608182601f011015612f725760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b828284011015612fc45760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b818301845110156130175760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610409565b6060821580156130365760405191506000825260208201604052613080565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561306f578051835260209283019201613057565b5050858452601f01601f1916604052505b50949350505050565b606083156130f85782516000036130f1576001600160a01b0385163b6130f15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610409565b50816108ab565b6108ab8383613332565b60606000806000613112856124aa565b91945092509050600181600181111561312d5761312d613896565b146131a05760405162461bcd60e51b815260206004820152603860248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206c697374206973206e6f742061206c697374206974656d00000000000000006064820152608401610409565b84516131ac8385613735565b1461321f5760405162461bcd60e51b815260206004820152603260248201527f524c505265616465723a206c697374206974656d2068617320616e20696e766160448201527f6c696420646174612072656d61696e64657200000000000000000000000000006064820152608401610409565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816132385790505090506000845b8751811015613326576000806132ab6040518060400160405280858d6000015161328f91906135d7565b8152602001858d602001516132a49190613735565b90526124aa565b5091509150604051806040016040528083836132c79190613735565b8152602001848c602001516132dc9190613735565b8152508585815181106132f1576132f161371f565b6020908102919091010152613307600185613735565b93506133138183613735565b61331d9084613735565b92505050613265565b50815295945050505050565b8151156133425781518083602001fd5b8060405162461bcd60e51b81526004016104099190613828565b60008083601f84011261336e57600080fd5b50813567ffffffffffffffff81111561338657600080fd5b6020830191508360208260051b85010111156133a157600080fd5b9250929050565b6000806000604084860312156133bd57600080fd5b83359250602084013567ffffffffffffffff8111156133db57600080fd5b6133e78682870161335c565b9497909650939450505050565b60006020828403121561340657600080fd5b81356001600160e01b03198116811461133757600080fd5b6001600160a01b03811681146110ba57600080fd5b6000806040838503121561344657600080fd5b82356134518161341e565b915060208301356134618161341e565b809150509250929050565b60006020828403121561347e57600080fd5b5035919050565b6000806040838503121561349857600080fd5b8235915060208301356134618161341e565b6000602082840312156134bc57600080fd5b81356113378161341e565b600080600080606085870312156134dd57600080fd5b8435935060208501356134ef8161341e565b9250604085013567ffffffffffffffff81111561350b57600080fd5b6135178782880161335c565b95989497509550505050565b600080600080600060a0868803121561353b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561357157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761068e5761068e613580565b634e487b7160e01b600052601260045260246000fd5b6000826135d2576135d26135ad565b500490565b8181038181111561068e5761068e613580565b6000602082840312156135fc57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561364257613642613603565b604052919050565b600067ffffffffffffffff8084111561366557613665613603565b8360051b6020613676818301613619565b86815291850191818101903684111561368e57600080fd5b865b84811015613713578035868111156136a85760008081fd5b8801601f36818301126136bb5760008081fd5b8135888111156136cd576136cd613603565b6136de818301601f19168801613619565b915080825236878285010111156136f55760008081fd5b80878401888401376000908201870152845250918301918301613690565b50979650505050505050565b634e487b7160e01b600052603260045260246000fd5b8082018082111561068e5761068e613580565b60006001820161375a5761375a613580565b5060010190565b60006020828403121561377357600080fd5b8151801515811461133757600080fd5b60005b8381101561379e578181015183820152602001613786565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516137df816017850160208801613783565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161381c816028840160208801613783565b01602801949350505050565b6020815260008251806020840152613847816040850160208701613783565b601f01601f19169190910160400192915050565b600060ff83168061386e5761386e6135ad565b8060ff84160691505092915050565b60ff828116828216039081111561068e5761068e613580565b634e487b7160e01b600052602160045260246000fd5b6000816138bb576138bb613580565b506000190190565b600082516138d5818460208701613783565b919091019291505056fea26469706673582212206ee24dc634614d6c6959f24d9ce7efdb5cc31b9c48a186879cff6877a676180f64736f6c63430008130033", "devdoc": { "events": { "Initialized(uint8)": { @@ -749,15 +749,15 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 5446, + "astId": 4456, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "rewardToken", "offset": 0, "slot": "201", - "type": "t_contract(IERC20)4251" + "type": "t_contract(IERC20)3664" }, { - "astId": 5449, + "astId": 4459, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "rewards", "offset": 0, @@ -765,15 +765,15 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 5454, + "astId": 4464, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "Rewards", "offset": 0, "slot": "203", - "type": "t_mapping(t_uint256,t_struct(Reward)5443_storage)" + "type": "t_mapping(t_uint256,t_struct(Reward)4453_storage)" }, { - "astId": 5458, + "astId": 4468, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "delegatorAddresses", "offset": 0, @@ -815,7 +815,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IERC20)4251": { + "t_contract(IERC20)3664": { "encoding": "inplace", "label": "contract IERC20", "numberOfBytes": "20" @@ -848,19 +848,19 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)1331_storage" }, - "t_mapping(t_uint256,t_struct(Reward)5443_storage)": { + "t_mapping(t_uint256,t_struct(Reward)4453_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct SonneMerkleDistributor.Reward)", "numberOfBytes": "32", - "value": "t_struct(Reward)5443_storage" + "value": "t_struct(Reward)4453_storage" }, - "t_struct(Reward)5443_storage": { + "t_struct(Reward)4453_storage": { "encoding": "inplace", "label": "struct SonneMerkleDistributor.Reward", "members": [ { - "astId": 5432, + "astId": 4442, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "balance", "offset": 0, @@ -868,7 +868,7 @@ "type": "t_uint256" }, { - "astId": 5434, + "astId": 4444, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "merkleRoot", "offset": 0, @@ -876,7 +876,7 @@ "type": "t_bytes32" }, { - "astId": 5436, + "astId": 4446, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "withdrawUnlockTime", "offset": 0, @@ -884,7 +884,7 @@ "type": "t_uint256" }, { - "astId": 5438, + "astId": 4448, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "ratio", "offset": 0, @@ -892,7 +892,7 @@ "type": "t_uint256" }, { - "astId": 5442, + "astId": 4452, "contract": "contracts/SonneMerkleDistributor.sol:SonneMerkleDistributor", "label": "leafClaimed", "offset": 0, diff --git a/crosschain-rewards/deployments/base/solcInputs/e41af02d1a0e58fedcc89f1f25416408.json b/crosschain-rewards/deployments/base/solcInputs/e41af02d1a0e58fedcc89f1f25416408.json new file mode 100644 index 0000000..517af3f --- /dev/null +++ b/crosschain-rewards/deployments/base/solcInputs/e41af02d1a0e58fedcc89f1f25416408.json @@ -0,0 +1,95 @@ +{ + "language": "Solidity", + "sources": { + "@eth-optimism/contracts-bedrock/contracts/libraries/Bytes.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Bytes\n/// @notice Bytes is a library for manipulating byte arrays.\nlibrary Bytes {\n /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils\n /// @notice Slices a byte array with a given starting index and length. Returns a new byte array\n /// as opposed to a pointer to the original array. Will throw if trying to slice more\n /// bytes than exist in the array.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @param _length Length of the slice.\n /// @return Slice of the input byte array.\n function slice(\n bytes memory _bytes,\n uint256 _start,\n uint256 _length\n ) internal pure returns (bytes memory) {\n unchecked {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_start + _length >= _start, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n }\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n /// @notice Slices a byte array with a given starting index up to the end of the original byte\n /// array. Returns a new array rathern than a pointer to the original.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\n if (_start >= _bytes.length) {\n return bytes(\"\");\n }\n return slice(_bytes, _start, _bytes.length - _start);\n }\n\n /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles.\n /// Resulting nibble array will be exactly twice as long as the input byte array.\n /// @param _bytes Input byte array to convert.\n /// @return Resulting nibble array.\n function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\n bytes memory _nibbles;\n assembly {\n // Grab a free memory offset for the new array\n _nibbles := mload(0x40)\n\n // Load the length of the passed bytes array from memory\n let bytesLength := mload(_bytes)\n\n // Calculate the length of the new nibble array\n // This is the length of the input array times 2\n let nibblesLength := shl(0x01, bytesLength)\n\n // Update the free memory pointer to allocate memory for the new array.\n // To do this, we add the length of the new array + 32 bytes for the array length\n // rounded up to the nearest 32 byte boundary to the current free memory pointer.\n mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F))))\n\n // Store the length of the new array in memory\n mstore(_nibbles, nibblesLength)\n\n // Store the memory offset of the _bytes array's contents on the stack\n let bytesStart := add(_bytes, 0x20)\n\n // Store the memory offset of the nibbles array's contents on the stack\n let nibblesStart := add(_nibbles, 0x20)\n\n // Loop through each byte in the input array\n for {\n let i := 0x00\n } lt(i, bytesLength) {\n i := add(i, 0x01)\n } {\n // Get the starting offset of the next 2 bytes in the nibbles array\n let offset := add(nibblesStart, shl(0x01, i))\n // Load the byte at the current index within the `_bytes` array\n let b := byte(0x00, mload(add(bytesStart, i)))\n\n // Pull out the first nibble and store it in the new array\n mstore8(offset, shr(0x04, b))\n // Pull out the second nibble and store it in the new array\n mstore8(add(offset, 0x01), and(b, 0x0F))\n }\n }\n return _nibbles;\n }\n\n /// @notice Compares two byte arrays by comparing their keccak256 hashes.\n /// @param _bytes First byte array to compare.\n /// @param _other Second byte array to compare.\n /// @return True if the two byte arrays are equal, false otherwise.\n function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\n return keccak256(_bytes) == keccak256(_other);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/contracts/libraries/rlp/RLPReader.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.8;\n\n/**\n * @custom:attribution https://github.com/hamdiallam/Solidity-RLP\n * @title RLPReader\n * @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted\n * from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with\n * various tweaks to improve readability.\n */\nlibrary RLPReader {\n /**\n * Custom pointer type to avoid confusion between pointers and uint256s.\n */\n type MemoryPointer is uint256;\n\n /**\n * @notice RLP item types.\n *\n * @custom:value DATA_ITEM Represents an RLP data item (NOT a list).\n * @custom:value LIST_ITEM Represents an RLP list item.\n */\n enum RLPItemType {\n DATA_ITEM,\n LIST_ITEM\n }\n\n /**\n * @notice Struct representing an RLP item.\n *\n * @custom:field length Length of the RLP item.\n * @custom:field ptr Pointer to the RLP item in memory.\n */\n struct RLPItem {\n uint256 length;\n MemoryPointer ptr;\n }\n\n /**\n * @notice Max list length that this library will accept.\n */\n uint256 internal constant MAX_LIST_LENGTH = 32;\n\n /**\n * @notice Converts bytes to a reference to memory position and length.\n *\n * @param _in Input bytes to convert.\n *\n * @return Output memory reference.\n */\n function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory) {\n // Empty arrays are not RLP items.\n require(\n _in.length > 0,\n \"RLPReader: length of an RLP item must be greater than zero to be decodable\"\n );\n\n MemoryPointer ptr;\n assembly {\n ptr := add(_in, 32)\n }\n\n return RLPItem({ length: _in.length, ptr: ptr });\n }\n\n /**\n * @notice Reads an RLP list value into a list of RLP items.\n *\n * @param _in RLP list value.\n *\n * @return Decoded RLP list items.\n */\n function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory) {\n (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(\n itemType == RLPItemType.LIST_ITEM,\n \"RLPReader: decoded item type for list is not a list item\"\n );\n\n require(\n listOffset + listLength == _in.length,\n \"RLPReader: list item has an invalid data remainder\"\n );\n\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\n // writing to the length. Since we can't know the number of RLP items without looping over\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\n // simply set a reasonable maximum list length and decrease the size before we finish.\n RLPItem[] memory out = new RLPItem[](MAX_LIST_LENGTH);\n\n uint256 itemCount = 0;\n uint256 offset = listOffset;\n while (offset < _in.length) {\n (uint256 itemOffset, uint256 itemLength, ) = _decodeLength(\n RLPItem({\n length: _in.length - offset,\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\n })\n );\n\n // We don't need to check itemCount < out.length explicitly because Solidity already\n // handles this check on our behalf, we'd just be wasting gas.\n out[itemCount] = RLPItem({\n length: itemLength + itemOffset,\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\n });\n\n itemCount += 1;\n offset += itemOffset + itemLength;\n }\n\n // Decrease the array size to match the actual item count.\n assembly {\n mstore(out, itemCount)\n }\n\n return out;\n }\n\n /**\n * @notice Reads an RLP list value into a list of RLP items.\n *\n * @param _in RLP list value.\n *\n * @return Decoded RLP list items.\n */\n function readList(bytes memory _in) internal pure returns (RLPItem[] memory) {\n return readList(toRLPItem(_in));\n }\n\n /**\n * @notice Reads an RLP bytes value into bytes.\n *\n * @param _in RLP bytes value.\n *\n * @return Decoded bytes.\n */\n function readBytes(RLPItem memory _in) internal pure returns (bytes memory) {\n (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(\n itemType == RLPItemType.DATA_ITEM,\n \"RLPReader: decoded item type for bytes is not a data item\"\n );\n\n require(\n _in.length == itemOffset + itemLength,\n \"RLPReader: bytes value contains an invalid remainder\"\n );\n\n return _copy(_in.ptr, itemOffset, itemLength);\n }\n\n /**\n * @notice Reads an RLP bytes value into bytes.\n *\n * @param _in RLP bytes value.\n *\n * @return Decoded bytes.\n */\n function readBytes(bytes memory _in) internal pure returns (bytes memory) {\n return readBytes(toRLPItem(_in));\n }\n\n /**\n * @notice Reads the raw bytes of an RLP item.\n *\n * @param _in RLP item to read.\n *\n * @return Raw RLP bytes.\n */\n function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory) {\n return _copy(_in.ptr, 0, _in.length);\n }\n\n /**\n * @notice Decodes the length of an RLP item.\n *\n * @param _in RLP item to decode.\n *\n * @return Offset of the encoded data.\n * @return Length of the encoded data.\n * @return RLP item type (LIST_ITEM or DATA_ITEM).\n */\n function _decodeLength(RLPItem memory _in)\n private\n pure\n returns (\n uint256,\n uint256,\n RLPItemType\n )\n {\n // Short-circuit if there's nothing to decode, note that we perform this check when\n // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass\n // that function and create an RLP item directly. So we need to check this anyway.\n require(\n _in.length > 0,\n \"RLPReader: length of an RLP item must be greater than zero to be decodable\"\n );\n\n MemoryPointer ptr = _in.ptr;\n uint256 prefix;\n assembly {\n prefix := byte(0, mload(ptr))\n }\n\n if (prefix <= 0x7f) {\n // Single byte.\n return (0, 1, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xb7) {\n // Short string.\n\n // slither-disable-next-line variable-scope\n uint256 strLen = prefix - 0x80;\n\n require(\n _in.length > strLen,\n \"RLPReader: length of content must be greater than string length (short string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n strLen != 1 || firstByteOfContent >= 0x80,\n \"RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)\"\n );\n\n return (1, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xbf) {\n // Long string.\n uint256 lenOfStrLen = prefix - 0xb7;\n\n require(\n _in.length > lenOfStrLen,\n \"RLPReader: length of content must be > than length of string length (long string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00,\n \"RLPReader: length of content must not have any leading zeros (long string)\"\n );\n\n uint256 strLen;\n assembly {\n strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1)))\n }\n\n require(\n strLen > 55,\n \"RLPReader: length of content must be greater than 55 bytes (long string)\"\n );\n\n require(\n _in.length > lenOfStrLen + strLen,\n \"RLPReader: length of content must be greater than total length (long string)\"\n );\n\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xf7) {\n // Short list.\n // slither-disable-next-line variable-scope\n uint256 listLen = prefix - 0xc0;\n\n require(\n _in.length > listLen,\n \"RLPReader: length of content must be greater than list length (short list)\"\n );\n\n return (1, listLen, RLPItemType.LIST_ITEM);\n } else {\n // Long list.\n uint256 lenOfListLen = prefix - 0xf7;\n\n require(\n _in.length > lenOfListLen,\n \"RLPReader: length of content must be > than length of list length (long list)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00,\n \"RLPReader: length of content must not have any leading zeros (long list)\"\n );\n\n uint256 listLen;\n assembly {\n listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1)))\n }\n\n require(\n listLen > 55,\n \"RLPReader: length of content must be greater than 55 bytes (long list)\"\n );\n\n require(\n _in.length > lenOfListLen + listLen,\n \"RLPReader: length of content must be greater than total length (long list)\"\n );\n\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\n }\n }\n\n /**\n * @notice Copies the bytes from a memory location.\n *\n * @param _src Pointer to the location to read from.\n * @param _offset Offset to start reading from.\n * @param _length Number of bytes to read.\n *\n * @return Copied bytes.\n */\n function _copy(\n MemoryPointer _src,\n uint256 _offset,\n uint256 _length\n ) private pure returns (bytes memory) {\n bytes memory out = new bytes(_length);\n if (_length == 0) {\n return out;\n }\n\n // Mostly based on Solidity's copy_memory_to_memory:\n // solhint-disable max-line-length\n // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114\n uint256 src = MemoryPointer.unwrap(_src) + _offset;\n assembly {\n let dest := add(out, 32)\n let i := 0\n for {\n\n } lt(i, _length) {\n i := add(i, 32)\n } {\n mstore(add(dest, i), mload(add(src, i)))\n }\n\n if gt(i, _length) {\n mstore(add(dest, _length), 0)\n }\n }\n\n return out;\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport { Bytes } from \"../Bytes.sol\";\nimport { RLPReader } from \"../rlp/RLPReader.sol\";\n\n/**\n * @title MerkleTrie\n * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie\n * inclusion proofs. By default, this library assumes a hexary trie. One can change the\n * trie radix constant to support other trie radixes.\n */\nlibrary MerkleTrie {\n /**\n * @notice Struct representing a node in the trie.\n *\n * @custom:field encoded The RLP-encoded node.\n * @custom:field decoded The RLP-decoded node.\n */\n struct TrieNode {\n bytes encoded;\n RLPReader.RLPItem[] decoded;\n }\n\n /**\n * @notice Determines the number of elements per branch node.\n */\n uint256 internal constant TREE_RADIX = 16;\n\n /**\n * @notice Branch nodes have TREE_RADIX elements and one value element.\n */\n uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;\n\n /**\n * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`.\n */\n uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;\n\n /**\n * @notice Prefix for even-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_EVEN = 0;\n\n /**\n * @notice Prefix for odd-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_ODD = 1;\n\n /**\n * @notice Prefix for even-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_EVEN = 2;\n\n /**\n * @notice Prefix for odd-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_ODD = 3;\n\n /**\n * @notice Verifies a proof that a given key/value pair is present in the trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n return Bytes.equal(_value, get(_key, _proof, _root));\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bytes memory) {\n require(_key.length > 0, \"MerkleTrie: empty key\");\n\n TrieNode[] memory proof = _parseProof(_proof);\n bytes memory key = Bytes.toNibbles(_key);\n bytes memory currentNodeID = abi.encodePacked(_root);\n uint256 currentKeyIndex = 0;\n\n // Proof is top-down, so we start at the first element (root).\n for (uint256 i = 0; i < proof.length; i++) {\n TrieNode memory currentNode = proof[i];\n\n // Key index should never exceed total key length or we'll be out of bounds.\n require(\n currentKeyIndex <= key.length,\n \"MerkleTrie: key index exceeds total key length\"\n );\n\n if (currentKeyIndex == 0) {\n // First proof element is always the root node.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid root hash\"\n );\n } else if (currentNode.encoded.length >= 32) {\n // Nodes 32 bytes or larger are hashed inside branch nodes.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid large internal hash\"\n );\n } else {\n // Nodes smaller than 32 bytes aren't hashed.\n require(\n Bytes.equal(currentNode.encoded, currentNodeID),\n \"MerkleTrie: invalid internal node hash\"\n );\n }\n\n if (currentNode.decoded.length == BRANCH_NODE_LENGTH) {\n if (currentKeyIndex == key.length) {\n // Value is the last element of the decoded list (for branch nodes). There's\n // some ambiguity in the Merkle trie specification because bytes(0) is a\n // valid value to place into the trie, but for branch nodes bytes(0) can exist\n // even when the value wasn't explicitly placed there. Geth treats a value of\n // bytes(0) as \"key does not exist\" and so we do the same.\n bytes memory value = RLPReader.readBytes(currentNode.decoded[TREE_RADIX]);\n require(\n value.length > 0,\n \"MerkleTrie: value length must be greater than zero (branch)\"\n );\n\n // Extra proof elements are not allowed.\n require(\n i == proof.length - 1,\n \"MerkleTrie: value node must be last node in proof (branch)\"\n );\n\n return value;\n } else {\n // We're not at the end of the key yet.\n // Figure out what the next node ID should be and continue.\n uint8 branchKey = uint8(key[currentKeyIndex]);\n RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];\n currentNodeID = _getNodeID(nextNode);\n currentKeyIndex += 1;\n }\n } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {\n bytes memory path = _getNodePath(currentNode);\n uint8 prefix = uint8(path[0]);\n uint8 offset = 2 - (prefix % 2);\n bytes memory pathRemainder = Bytes.slice(path, offset);\n bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex);\n uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);\n\n // Whether this is a leaf node or an extension node, the path remainder MUST be a\n // prefix of the key remainder (or be equal to the key remainder) or the proof is\n // considered invalid.\n require(\n pathRemainder.length == sharedNibbleLength,\n \"MerkleTrie: path remainder must share all nibbles with key\"\n );\n\n if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {\n // Prefix of 2 or 3 means this is a leaf node. For the leaf node to be valid,\n // the key remainder must be exactly equal to the path remainder. We already\n // did the necessary byte comparison, so it's more efficient here to check that\n // the key remainder length equals the shared nibble length, which implies\n // equality with the path remainder (since we already did the same check with\n // the path remainder and the shared nibble length).\n require(\n keyRemainder.length == sharedNibbleLength,\n \"MerkleTrie: key remainder must be identical to path remainder\"\n );\n\n // Our Merkle Trie is designed specifically for the purposes of the Ethereum\n // state trie. Empty values are not allowed in the state trie, so we can safely\n // say that if the value is empty, the key should not exist and the proof is\n // invalid.\n bytes memory value = RLPReader.readBytes(currentNode.decoded[1]);\n require(\n value.length > 0,\n \"MerkleTrie: value length must be greater than zero (leaf)\"\n );\n\n // Extra proof elements are not allowed.\n require(\n i == proof.length - 1,\n \"MerkleTrie: value node must be last node in proof (leaf)\"\n );\n\n return value;\n } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {\n // Prefix of 0 or 1 means this is an extension node. We move onto the next node\n // in the proof and increment the key index by the length of the path remainder\n // which is equal to the shared nibble length.\n currentNodeID = _getNodeID(currentNode.decoded[1]);\n currentKeyIndex += sharedNibbleLength;\n } else {\n revert(\"MerkleTrie: received a node with an unknown prefix\");\n }\n } else {\n revert(\"MerkleTrie: received an unparseable node\");\n }\n }\n\n revert(\"MerkleTrie: ran out of proof elements\");\n }\n\n /**\n * @notice Parses an array of proof elements into a new array that contains both the original\n * encoded element and the RLP-decoded element.\n *\n * @param _proof Array of proof elements to parse.\n *\n * @return Proof parsed into easily accessible structs.\n */\n function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) {\n uint256 length = _proof.length;\n TrieNode[] memory proof = new TrieNode[](length);\n for (uint256 i = 0; i < length; ) {\n proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) });\n unchecked {\n ++i;\n }\n }\n return proof;\n }\n\n /**\n * @notice Picks out the ID for a node. Node ID is referred to as the \"hash\" within the\n * specification, but nodes < 32 bytes are not actually hashed.\n *\n * @param _node Node to pull an ID for.\n *\n * @return ID for the node, depending on the size of its contents.\n */\n function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) {\n return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node);\n }\n\n /**\n * @notice Gets the path for a leaf or extension node.\n *\n * @param _node Node to get a path for.\n *\n * @return Node path, converted to an array of nibbles.\n */\n function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) {\n return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0]));\n }\n\n /**\n * @notice Utility; determines the number of nibbles shared between two nibble arrays.\n *\n * @param _a First nibble array.\n * @param _b Second nibble array.\n *\n * @return Number of shared nibbles.\n */\n function _getSharedNibbleLength(bytes memory _a, bytes memory _b)\n private\n pure\n returns (uint256)\n {\n uint256 shared;\n uint256 max = (_a.length < _b.length) ? _a.length : _b.length;\n for (; shared < max && _a[shared] == _b[shared]; ) {\n unchecked {\n ++shared;\n }\n }\n return shared;\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/contracts/libraries/trie/SecureMerkleTrie.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/* Library Imports */\nimport { MerkleTrie } from \"./MerkleTrie.sol\";\n\n/**\n * @title SecureMerkleTrie\n * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input\n * keys. Ethereum's state trie hashes input keys before storing them.\n */\nlibrary SecureMerkleTrie {\n /**\n * @notice Verifies a proof that a given key/value pair is present in the Merkle trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bytes memory) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.get(key, _proof, _root);\n }\n\n /**\n * @notice Computes the hashed version of the input key.\n *\n * @param _key Key to hash.\n *\n * @return Hashed version of the key.\n */\n function _getSecureKey(bytes memory _key) private pure returns (bytes memory) {\n return abi.encodePacked(keccak256(_key));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal onlyInitializing {\n }\n\n function __AccessControl_init_unchained() internal onlyInitializing {\n }\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(account),\n \" is missing role \",\n StringsUpgradeable.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/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" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal onlyInitializing {\n }\n\n function __ERC165_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMathUpgradeable {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\nimport \"./math/SignedMathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = MathUpgradeable.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMathUpgradeable.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, MathUpgradeable.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@openzeppelin/contracts/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" + }, + "@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" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../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. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(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" + }, + "@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" + }, + "contracts/interfaces/ISonneMerkleDistributor.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity 0.8.19;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\ninterface ISonneMerkleDistributor {\n event NewMerkle(\n address indexed creator,\n address indexed rewardToken,\n uint256 amount,\n bytes32 indexed merkleRoot,\n uint256 blockNr,\n uint256 withdrawUnlockTime\n );\n event MerkleFundUpdate(\n address indexed funder,\n bytes32 indexed merkleRoot,\n uint256 blockNr,\n uint256 amount,\n bool withdrawal\n );\n event MerkleClaim(address indexed claimer, address indexed rewardToken, uint256 indexed blockNr, uint256 amount);\n\n function rewardToken() external view returns (IERC20);\n\n function Rewards(\n uint256 blockNumber\n ) external view returns (uint256 balance, bytes32 merkleRoot, uint256 withdrawUnlockTime, uint256 ratio);\n\n function delegatorAddresses(address _delegator) external view returns (address originalRecipient);\n\n function setDelegator(address _recipient, address _delegator) external;\n\n function addReward(\n uint256 amount,\n bytes32 merkleRoot,\n uint256 blockNumber,\n uint256 withdrawUnlockTime,\n uint256 totalStakedBalance\n ) external;\n\n function withdrawFunds(uint256 blockNumber, uint256 amount) external;\n\n function claim(uint256 blockNumber, bytes[] calldata proof) external;\n\n function isClaimable(uint256 blockNumber, address account, bytes[] calldata proof) external view returns (bool);\n}\n" + }, + "contracts/SonneMerkleDistributor.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity 0.8.19;\n\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\nimport {SecureMerkleTrie} from '@eth-optimism/contracts-bedrock/contracts/libraries/trie/SecureMerkleTrie.sol';\nimport {RLPReader} from '@eth-optimism/contracts-bedrock/contracts/libraries/rlp/RLPReader.sol';\nimport {ISonneMerkleDistributor} from './interfaces/ISonneMerkleDistributor.sol';\n\n/// @title Sonne Finance Merkle tree-based rewards distributor\n/// @notice Contract to distribute rewards on BASE network to Sonne Finance Optimism stakers\ncontract SonneMerkleDistributor is\n Initializable,\n ReentrancyGuardUpgradeable,\n AccessControlUpgradeable,\n ISonneMerkleDistributor\n{\n using SafeERC20 for IERC20;\n\n bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE');\n bytes32 public constant FUNDS_ROLE = keccak256('FUNDS_ROLE');\n\n struct Reward {\n uint256 balance; // amount of reward tokens held in this reward\n bytes32 merkleRoot; // root of claims merkle tree\n uint256 withdrawUnlockTime; // time after which owner can withdraw remaining rewards\n uint256 ratio; // ratio of rewards to be distributed per one staked token on OP\n mapping(bytes32 => bool) leafClaimed; // mapping of leafes that already claimed\n }\n\n IERC20 public rewardToken;\n uint256[] public rewards; // a list of all rewards\n\n mapping(uint256 => Reward) public Rewards; // mapping between blockNumber => Reward\n mapping(address => address) public delegatorAddresses;\n\n /// mapping to allow msg.sender to claim on behalf of a delegators address\n\n /// @notice Contract constructor to initialize rewardToken\n /// @param _rewardToken The reward token to be distributed\n function initialize(IERC20 _rewardToken) external initializer {\n __ReentrancyGuard_init();\n __AccessControl_init();\n\n require(address(_rewardToken) != address(0), 'Token cannot be zero');\n rewardToken = _rewardToken;\n\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _grantRole(MANAGER_ROLE, msg.sender);\n _grantRole(FUNDS_ROLE, msg.sender);\n }\n\n /// @notice Sets a delegator address for a given recipient\n /// @param _recipient original eligible recipient address\n /// @param _delegator The address that sould claim on behalf of the owner\n function setDelegator(address _recipient, address _delegator) external onlyRole(MANAGER_ROLE) {\n require(_recipient != address(0) && _delegator != address(0), 'Invalid address provided');\n delegatorAddresses[_delegator] = _recipient;\n }\n\n /// @notice Creates a new Reward struct for a rewards distribution\n /// @param amount The amount of reward tokens to deposit\n /// @param merkleRoot The merkle root of the distribution tree\n /// @param blockNumber The block number for the Reward\n /// @param withdrawUnlockTime The timestamp after which withdrawals by owner are allowed\n /// @param totalStakedBalance Total staked balance of the merkleRoot (computed off-chain)\n function addReward(\n uint256 amount,\n bytes32 merkleRoot,\n uint256 blockNumber,\n uint256 withdrawUnlockTime,\n uint256 totalStakedBalance\n ) external onlyRole(MANAGER_ROLE) {\n require(merkleRoot != bytes32(0), 'Merkle root cannot be zero');\n\n // creates a new reward struct tied to the blocknumber the merkleProof was created at\n Reward storage reward = Rewards[blockNumber];\n\n require(reward.merkleRoot == bytes32(0), 'Merkle root was already posted');\n uint256 balance = rewardToken.balanceOf(msg.sender);\n require(amount > 0 && amount <= balance, 'Invalid amount or insufficient balance');\n\n // transfer rewardToken from the distributor to the contract\n rewardToken.safeTransferFrom(msg.sender, address(this), amount);\n\n // record Reward in stable storage\n reward.balance = amount;\n reward.merkleRoot = merkleRoot;\n reward.withdrawUnlockTime = withdrawUnlockTime;\n reward.ratio = (amount * 1e36) / (totalStakedBalance);\n rewards.push(blockNumber);\n emit NewMerkle(msg.sender, address(rewardToken), amount, merkleRoot, blockNumber, withdrawUnlockTime);\n }\n\n /// @notice Allows to withdraw available funds to owner after unlock time\n /// @param blockNumber The block number for the Reward\n /// @param amount The amount to withdraw\n function withdrawFunds(uint256 blockNumber, uint256 amount) external onlyRole(FUNDS_ROLE) {\n Reward storage reward = Rewards[blockNumber];\n require(block.timestamp >= reward.withdrawUnlockTime, 'Rewards may not be withdrawn');\n require(amount <= reward.balance, 'Insufficient balance');\n\n // update Rewards record\n reward.balance = reward.balance -= amount;\n\n // transfer rewardToken back to owner\n rewardToken.safeTransfer(msg.sender, amount);\n emit MerkleFundUpdate(msg.sender, reward.merkleRoot, blockNumber, amount, true);\n }\n\n /// @notice Claims the specified amount for an account if valid\n /// @dev Checks proofs and claims tracking before transferring rewardTokens\n /// @param blockNumber The block number for the Reward\n /// @param proof The merkle proof for the claim\n function claim(uint256 blockNumber, bytes[] calldata proof) external nonReentrant {\n Reward storage reward = Rewards[blockNumber];\n require(reward.merkleRoot != bytes32(0), 'Reward not found');\n\n // Check if the delegatorAddresses includes the account\n // The delegatorAddresses mapping allows for an account to delegate its claim ability to another address\n // This can be useful in scenarios where the target recipient might not have the ability to directly interact\n // with the BASE network contract (e.g. a smart contract with a different address)\n address recipient = delegatorAddresses[msg.sender] != address(0) ? delegatorAddresses[msg.sender] : msg.sender;\n\n // Assuming slotNr is 2 as per your previous function\n bytes32 key = keccak256(abi.encode(recipient, uint256(2)));\n\n //Get the amount of the key from the merkel tree\n uint256 amount = _getValueFromMerkleTree(reward.merkleRoot, key, proof);\n\n // calculate the reward based on the ratio\n uint256 rewardAmount = (amount * reward.ratio) / 1e36; // TODO check if there is a loss of precision possible here\n\n require(reward.balance >= rewardAmount, 'Claim under-funded by funder.');\n require(Rewards[blockNumber].leafClaimed[key] == false, 'Already claimed');\n\n // marks the leaf as claimed\n reward.leafClaimed[key] = true;\n\n // Subtract the rewardAmount, not the amount\n reward.balance = reward.balance - rewardAmount;\n\n //Send reward tokens to the recipient\n rewardToken.safeTransfer(msg.sender, rewardAmount);\n\n emit MerkleClaim(recipient, address(rewardToken), blockNumber, rewardAmount);\n }\n\n /// @notice Checks if a claim is valid and claimable\n /// @param blockNumber The block number for the Reward\n /// @param account The address of the account claiming\n /// @param proof The merkle proof for the claim\n /// @return A bool indicating if the claim is valid and claimable\n function isClaimable(uint256 blockNumber, address account, bytes[] calldata proof) external view returns (bool) {\n bytes32 merkleRoot = Rewards[blockNumber].merkleRoot;\n\n // At the staking contract, the balances are stored in a mapping (address => uint256) at storage slot 2\n bytes32 leaf = keccak256(abi.encode(account, uint256(2)));\n\n if (merkleRoot == 0) return false;\n return !Rewards[blockNumber].leafClaimed[leaf] && _getValueFromMerkleTree(merkleRoot, leaf, proof) > 0;\n }\n\n /// @dev Uses SecureMerkleTrie Library to extract the value from the Merkle proof provided by the user\n /// @param merkleRoot the merkle root\n /// @param key the key of the leaf => keccak256(address,2)\n /// @return result The converted uint256 value as stored in the slot on OP\n function _getValueFromMerkleTree(\n bytes32 merkleRoot,\n bytes32 key,\n bytes[] calldata proof\n ) internal pure returns (uint256 result) {\n // Uses SecureMerkleTrie Library to extract the value from the Merkle proof provided by the user\n // Reverts if Merkle proof verification fails\n bytes memory data = RLPReader.readBytes(SecureMerkleTrie.get(abi.encodePacked(key), proof, merkleRoot));\n\n for (uint256 i = 0; i < data.length; i++) {\n result = result * 256 + uint8(data[i]);\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/crosschain-rewards/src/types/factories/contracts/SonneMerkleDistributor__factory.ts b/crosschain-rewards/src/types/factories/contracts/SonneMerkleDistributor__factory.ts index ca428da..e703181 100644 --- a/crosschain-rewards/src/types/factories/contracts/SonneMerkleDistributor__factory.ts +++ b/crosschain-rewards/src/types/factories/contracts/SonneMerkleDistributor__factory.ts @@ -586,7 +586,7 @@ const _abi = [ ] as const; const _bytecode = - "0x608060405234801561001057600080fd5b50613915806100206000396000f3fe608060405234801561001057600080fd5b50600436106101505760003560e01c80639366452c116100cd578063e525310511610081578063f301af4211610066578063f301af421461032b578063f7c618c11461033e578063f8738c251461035157600080fd5b8063e5253105146102f1578063ec87621c1461030457600080fd5b8063a217fddf116100b2578063a217fddf146102c3578063c4d66de8146102cb578063d547741f146102de57600080fd5b80639366452c146102895780639b87ab6d1461029c57600080fd5b80632f2ff15d1161012457806341f891a41161010957806341f891a4146101fc5780636d46379b1461023d57806391d148541461025057600080fd5b80632f2ff15d146101d657806336568abe146101e957600080fd5b8062501e281461015557806301ffc9a71461016a5780631ce92be514610192578063248a9ca3146101a5575b600080fd5b6101686101633660046133a8565b6103a6565b005b61017d6101783660046133f4565b61062b565b60405190151581526020015b60405180910390f35b6101686101a0366004613433565b610694565b6101c86101b336600461346c565b60009081526097602052604090206001015490565b604051908152602001610189565b6101686101e4366004613485565b610768565b6101686101f7366004613485565b61078d565b61022561020a3660046134aa565b60cc602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610189565b61017d61024b3660046134c7565b610819565b61017d61025e366004613485565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610168610297366004613523565b6108b3565b6101c87f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c281565b6101c8600081565b6101686102d93660046134aa565b610b77565b6101686102ec366004613485565b610d7c565b6101686102ff36600461355e565b610da1565b6101c87f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b6101c861033936600461346c565b610f02565b60c954610225906001600160a01b031681565b61038661035f36600461346c565b60cb6020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610189565b6103ae610f23565b600083815260cb6020526040902060018101546104125760405162461bcd60e51b815260206004820152601060248201527f526577617264206e6f7420666f756e640000000000000000000000000000000060448201526064015b60405180910390fd5b33600090815260cc60205260408120546001600160a01b0316610435573361044f565b33600090815260cc60205260409020546001600160a01b03165b604080516001600160a01b0383166020820152600291810191909152909150600090606001604051602081830303815290604052805190602001209050600061049e8460010154838888610f7c565b905060006ec097ce7bc90715b34b9f10000000008560030154836104c29190613596565b6104cc91906135c3565b905080856000015410156105225760405162461bcd60e51b815260206004820152601d60248201527f436c61696d20756e6465722d66756e6465642062792066756e6465722e0000006044820152606401610409565b600088815260cb6020908152604080832086845260040190915290205460ff161561058f5760405162461bcd60e51b815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152606401610409565b60008381526004860160205260409020805460ff1916600117905584546105b79082906135d7565b855560c9546105d0906001600160a01b03168583611019565b60c95460405182815289916001600160a01b0390811691908716907fceea116ca90ae38b5f3bcd7482763d0bdd5915faed2146d37b1e3bcd1ea425379060200160405180910390a4505050505061062660018055565b505050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061068e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086106be816110b0565b6001600160a01b038316158015906106de57506001600160a01b03821615155b61072a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420616464726573732070726f766964656400000000000000006044820152606401610409565b506001600160a01b03908116600090815260cc6020526040902080549190921673ffffffffffffffffffffffffffffffffffffffff19909116179055565b600082815260976020526040902060010154610783816110b0565b61062683836110bd565b6001600160a01b038116331461080b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610409565b610815828261115f565b5050565b600084815260cb602090815260408083206001015481516001600160a01b0388168185015260028184015282518082038401815260609091019092528151919092012081830361086e576000925050506108ab565b600087815260cb6020908152604080832084845260040190915290205460ff161580156108a6575060006108a483838888610f7c565b115b925050505b949350505050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086108dd816110b0565b8461092a5760405162461bcd60e51b815260206004820152601a60248201527f4d65726b6c6520726f6f742063616e6e6f74206265207a65726f0000000000006044820152606401610409565b600084815260cb6020526040902060018101541561098a5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6520726f6f742077617320616c726561647920706f7374656400006044820152606401610409565b60c9546040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1091906135ea565b9050600088118015610a225750808811155b610a945760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420616d6f756e74206f7220696e73756666696369656e74206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610409565b60c954610aac906001600160a01b031633308b6111e2565b878255600182018790556002820185905583610ad7896ec097ce7bc90715b34b9f1000000000613596565b610ae191906135c3565b600383015560ca80546001810182556000919091527f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee10186905560c954604080518a81526020810189905290810187905288916001600160a01b03169033907f4993e379e2a0a87975314480436d8f2de32d291a64892cb63cdb0839d09044369060600160405180910390a45050505050505050565b600054610100900460ff1615808015610b975750600054600160ff909116105b80610bb15750303b158015610bb1575060005460ff166001145b610c235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610409565b6000805460ff191660011790558015610c46576000805461ff0019166101001790555b610c4e611239565b610c566112ae565b6001600160a01b038216610cac5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e2063616e6e6f74206265207a65726f0000000000000000000000006044820152606401610409565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416179055610cdf6000336110bd565b610d097f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08336110bd565b610d337f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2336110bd565b8015610815576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260976020526040902060010154610d97816110b0565b610626838361115f565b7f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2610dcb816110b0565b600083815260cb602052604090206002810154421015610e2d5760405162461bcd60e51b815260206004820152601c60248201527f52657761726473206d6179206e6f742062652077697468647261776e000000006044820152606401610409565b8054831115610e7e5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610409565b82816000016000828254610e9291906135d7565b918290555082555060c954610eb1906001600160a01b03163385611019565b6001808201546040805187815260208101879052908101929092529033907f210aece5a2bb3ac8bbec4d3bd83444123ef037a899b89d617e735799f983e6b39060600160405180910390a350505050565b60ca8181548110610f1257600080fd5b600091825260209091200154905081565b600260015403610f755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610409565b6002600155565b600080610fbd610fb886604051602001610f9891815260200190565b60408051601f19818403018152919052610fb2868861364a565b89611319565b61133e565b905060005b815181101561100f57818181518110610fdd57610fdd61371f565b016020015160f81c610ff184610100613596565b610ffb9190613735565b92508061100781613748565b915050610fc2565b5050949350505050565b6040516001600160a01b0383166024820152604481018290526106269084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152611351565b60018055565b6110ba8133611439565b50565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155760008281526097602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561111b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff16156108155760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516001600160a01b03808516602483015283166044820152606481018290526112339085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161105e565b50505050565b600054610100900460ff166112a45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6112ac6114ae565b565b600054610100900460ff166112ac5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060600061132685611519565b905061133381858561154b565b9150505b9392505050565b606061068e61134c83611e67565b611f23565b60006113a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120589092919063ffffffff16565b90508051600014806113c75750808060200190518101906113c79190613761565b6106265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610409565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155761146c81612067565b611477836020612079565b6040516020016114889291906137a7565b60408051601f198184030181529082905262461bcd60e51b825261040991600401613828565b600054610100900460ff166110aa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060818051906020012060405160200161153591815260200190565b6040516020818303038152906040529050919050565b6060600084511161159e5760405162461bcd60e51b815260206004820152601560248201527f4d65726b6c65547269653a20656d707479206b657900000000000000000000006044820152606401610409565b60006115a98461225a565b905060006115b686612349565b90506000846040516020016115cd91815260200190565b60405160208183030381529060405290506000805b8451811015611df85760008582815181106115ff576115ff61371f565b6020026020010151905084518311156116805760405162461bcd60e51b815260206004820152602e60248201527f4d65726b6c65547269653a206b657920696e646578206578636565647320746f60448201527f74616c206b6579206c656e6774680000000000000000000000000000000000006064820152608401610409565b8260000361171f57805180516020918201206040516116ce926116a892910190815260200190565b604051602081830303815290604052858051602091820120825192909101919091201490565b61171a5760405162461bcd60e51b815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f7420686173680000006044820152606401610409565b611842565b8051516020116117bb5780518051602091820120604051611749926116a892910190815260200190565b61171a5760405162461bcd60e51b815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c2068617368000000000000000000000000000000000000000000000000006064820152608401610409565b8051845160208087019190912082519190920120146118425760405162461bcd60e51b815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f65206861736800000000000000000000000000000000000000000000000000006064820152608401610409565b61184e60106001613735565b816020015151036119fb578451830361199357600061188a826020015160108151811061187d5761187d61371f565b6020026020010151611f23565b905060008151116119035760405162461bcd60e51b815260206004820152603b60248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286272616e63682900000000006064820152608401610409565b6001875161191191906135d7565b83146119855760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286272616e6368290000000000006064820152608401610409565b965061133795505050505050565b60008584815181106119a7576119a761371f565b602001015160f81c60f81b60f81c9050600082602001518260ff16815181106119d2576119d261371f565b602002602001015190506119e5816123ac565b95506119f2600186613735565b94505050611de5565b600281602001515103611d77576000611a13826123d1565b9050600081600081518110611a2a57611a2a61371f565b016020015160f81c90506000611a4160028361385b565b611a4c90600261387d565b90506000611a5d848360ff166123f5565b90506000611a6b8a896123f5565b90506000611a79838361242b565b905080835114611af15760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a20706174682072656d61696e646572206d7573742060448201527f736861726520616c6c206e6962626c65732077697468206b65790000000000006064820152608401610409565b60ff851660021480611b06575060ff85166003145b15611cac5780825114611b815760405162461bcd60e51b815260206004820152603d60248201527f4d65726b6c65547269653a206b65792072656d61696e646572206d757374206260448201527f65206964656e746963616c20746f20706174682072656d61696e6465720000006064820152608401610409565b6000611b9d886020015160018151811061187d5761187d61371f565b90506000815111611c165760405162461bcd60e51b815260206004820152603960248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286c65616629000000000000006064820152608401610409565b60018d51611c2491906135d7565b8914611c985760405162461bcd60e51b815260206004820152603860248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286c6561662900000000000000006064820152608401610409565b9c506113379b505050505050505050505050565b60ff85161580611cbf575060ff85166001145b15611cfe57611ceb8760200151600181518110611cde57611cde61371f565b60200260200101516123ac565b9950611cf7818a613735565b9850611d6c565b60405162461bcd60e51b815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e2070726566697800000000000000000000000000006064820152608401610409565b505050505050611de5565b60405162461bcd60e51b815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f64650000000000000000000000000000000000000000000000006064820152608401610409565b5080611df081613748565b9150506115e2565b5060405162461bcd60e51b815260206004820152602560248201527f4d65726b6c65547269653a2072616e206f7574206f662070726f6f6620656c6560448201527f6d656e74730000000000000000000000000000000000000000000000000000006064820152608401610409565b60408051808201909152600080825260208201526000825111611f055760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b50604080518082019091528151815260209182019181019190915290565b60606000806000611f33856124aa565b919450925090506000816001811115611f4e57611f4e613896565b14611fc15760405162461bcd60e51b815260206004820152603960248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206279746573206973206e6f7420612064617461206974656d000000000000006064820152608401610409565b611fcb8284613735565b8551146120405760405162461bcd60e51b815260206004820152603460248201527f524c505265616465723a2062797465732076616c756520636f6e7461696e732060448201527f616e20696e76616c69642072656d61696e6465720000000000000000000000006064820152608401610409565b61204f85602001518484612d6c565b95945050505050565b60606108ab8484600085612e0d565b606061068e6001600160a01b03831660145b60606000612088836002613596565b612093906002613735565b67ffffffffffffffff8111156120ab576120ab613603565b6040519080825280601f01601f1916602001820160405280156120d5576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061210c5761210c61371f565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106121575761215761371f565b60200101906001600160f81b031916908160001a905350600061217b846002613596565b612186906001613735565b90505b600181111561220b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106121c7576121c761371f565b1a60f81b8282815181106121dd576121dd61371f565b60200101906001600160f81b031916908160001a90535060049490941c93612204816138ac565b9050612189565b5083156113375760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610409565b805160609060008167ffffffffffffffff81111561227a5761227a613603565b6040519080825280602002602001820160405280156122bf57816020015b60408051808201909152606080825260208201528152602001906001900390816122985790505b50905060005b828110156123415760405180604001604052808683815181106122ea576122ea61371f565b6020026020010151815260200161231987848151811061230c5761230c61371f565b6020026020010151612ef4565b81525082828151811061232e5761232e61371f565b60209081029190910101526001016122c5565b509392505050565b606080604051905082518060011b603f8101601f1916830160405280835250602084016020830160005b838110156123a1578060011b82018184015160001a8060041c8253600f811660018301535050600101612373565b509295945050505050565b606060208260000151106123c8576123c382611f23565b61068e565b61068e82612f07565b606061068e6123f0836020015160008151811061187d5761187d61371f565b612349565b606082518210612414575060408051602081019091526000815261068e565b611337838384865161242691906135d7565b612f1d565b60008060008351855110612440578351612443565b84515b90505b808210801561249a57508382815181106124625761246261371f565b602001015160f81c60f81b6001600160f81b0319168583815181106124895761248961371f565b01602001516001600160f81b031916145b1561234157816001019150612446565b60008060008084600001511161253b5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b6020840151805160001a607f8111612560576000600160009450945094505050612d65565b60b7811161270a5760006125756080836135d7565b9050808760000151116126165760405162461bcd60e51b815260206004820152604e60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20737472696e67206c656e6774682060648201527f2873686f727420737472696e6729000000000000000000000000000000000000608482015260a401610409565b6001838101516001600160f81b031916908214158061265f57507f80000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610155b6126f75760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a20696e76616c6964207072656669782c2073696e676c60448201527f652062797465203c203078383020617265206e6f74207072656669786564202860648201527f73686f727420737472696e672900000000000000000000000000000000000000608482015260a401610409565b5060019550935060009250612d65915050565b60bf81116129d857600061271f60b7836135d7565b9050808760000151116127c05760405162461bcd60e51b815260206004820152605160248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f6620737472696e67206c656e60648201527f67746820286c6f6e6720737472696e6729000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b031916600081900361286c5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e6720737472696e672900000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c603781116129165760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f20737472696e6729000000000000000000000000000000000000000000000000608482015260a401610409565b6129208184613735565b8951116129bb5760405162461bcd60e51b815260206004820152604c60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e6720737472696e67290000000000000000000000000000000000000000608482015260a401610409565b6129c6836001613735565b9750955060009450612d659350505050565b60f78111612a9f5760006129ed60c0836135d7565b905080876000015111612a8e5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e206c697374206c656e67746820287360648201527f686f7274206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b600195509350849250612d65915050565b6000612aac60f7836135d7565b905080876000015111612b4d5760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f66206c697374206c656e677460648201527f6820286c6f6e67206c6973742900000000000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b0319166000819003612bf95760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e67206c69737429000000000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c60378111612ca35760405162461bcd60e51b815260206004820152604660248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f206c697374290000000000000000000000000000000000000000000000000000608482015260a401610409565b612cad8184613735565b895111612d485760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e67206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b612d53836001613735565b9750955060019450612d659350505050565b9193909250565b606060008267ffffffffffffffff811115612d8957612d89613603565b6040519080825280601f01601f191660200182016040528015612db3576020820181803683370190505b50905082600003612dc5579050611337565b6000612dd18587613735565b90506020820160005b85811015612df2578281015182820152602001612dda565b85811115612e01576000868301525b50919695505050505050565b606082471015612e855760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610409565b600080866001600160a01b03168587604051612ea191906138c3565b60006040518083038185875af1925050503d8060008114612ede576040519150601f19603f3d011682016040523d82523d6000602084013e612ee3565b606091505b50915091506108a687838387613089565b606061068e612f0283611e67565b613102565b606061068e826020015160008460000151612d6c565b60608182601f011015612f725760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b828284011015612fc45760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b818301845110156130175760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610409565b6060821580156130365760405191506000825260208201604052613080565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561306f578051835260209283019201613057565b5050858452601f01601f1916604052505b50949350505050565b606083156130f85782516000036130f1576001600160a01b0385163b6130f15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610409565b50816108ab565b6108ab8383613332565b60606000806000613112856124aa565b91945092509050600181600181111561312d5761312d613896565b146131a05760405162461bcd60e51b815260206004820152603860248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206c697374206973206e6f742061206c697374206974656d00000000000000006064820152608401610409565b84516131ac8385613735565b1461321f5760405162461bcd60e51b815260206004820152603260248201527f524c505265616465723a206c697374206974656d2068617320616e20696e766160448201527f6c696420646174612072656d61696e64657200000000000000000000000000006064820152608401610409565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816132385790505090506000845b8751811015613326576000806132ab6040518060400160405280858d6000015161328f91906135d7565b8152602001858d602001516132a49190613735565b90526124aa565b5091509150604051806040016040528083836132c79190613735565b8152602001848c602001516132dc9190613735565b8152508585815181106132f1576132f161371f565b6020908102919091010152613307600185613735565b93506133138183613735565b61331d9084613735565b92505050613265565b50815295945050505050565b8151156133425781518083602001fd5b8060405162461bcd60e51b81526004016104099190613828565b60008083601f84011261336e57600080fd5b50813567ffffffffffffffff81111561338657600080fd5b6020830191508360208260051b85010111156133a157600080fd5b9250929050565b6000806000604084860312156133bd57600080fd5b83359250602084013567ffffffffffffffff8111156133db57600080fd5b6133e78682870161335c565b9497909650939450505050565b60006020828403121561340657600080fd5b81356001600160e01b03198116811461133757600080fd5b6001600160a01b03811681146110ba57600080fd5b6000806040838503121561344657600080fd5b82356134518161341e565b915060208301356134618161341e565b809150509250929050565b60006020828403121561347e57600080fd5b5035919050565b6000806040838503121561349857600080fd5b8235915060208301356134618161341e565b6000602082840312156134bc57600080fd5b81356113378161341e565b600080600080606085870312156134dd57600080fd5b8435935060208501356134ef8161341e565b9250604085013567ffffffffffffffff81111561350b57600080fd5b6135178782880161335c565b95989497509550505050565b600080600080600060a0868803121561353b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561357157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761068e5761068e613580565b634e487b7160e01b600052601260045260246000fd5b6000826135d2576135d26135ad565b500490565b8181038181111561068e5761068e613580565b6000602082840312156135fc57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561364257613642613603565b604052919050565b600067ffffffffffffffff8084111561366557613665613603565b8360051b6020613676818301613619565b86815291850191818101903684111561368e57600080fd5b865b84811015613713578035868111156136a85760008081fd5b8801601f36818301126136bb5760008081fd5b8135888111156136cd576136cd613603565b6136de818301601f19168801613619565b915080825236878285010111156136f55760008081fd5b80878401888401376000908201870152845250918301918301613690565b50979650505050505050565b634e487b7160e01b600052603260045260246000fd5b8082018082111561068e5761068e613580565b60006001820161375a5761375a613580565b5060010190565b60006020828403121561377357600080fd5b8151801515811461133757600080fd5b60005b8381101561379e578181015183820152602001613786565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516137df816017850160208801613783565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161381c816028840160208801613783565b01602801949350505050565b6020815260008251806020840152613847816040850160208701613783565b601f01601f19169190910160400192915050565b600060ff83168061386e5761386e6135ad565b8060ff84160691505092915050565b60ff828116828216039081111561068e5761068e613580565b634e487b7160e01b600052602160045260246000fd5b6000816138bb576138bb613580565b506000190190565b600082516138d5818460208701613783565b919091019291505056fea2646970667358221220555fb7703a0396dc6648d2932374db5690df8e7d88caabea3decd240afbb634364736f6c63430008130033"; + "0x608060405234801561001057600080fd5b50613915806100206000396000f3fe608060405234801561001057600080fd5b50600436106101505760003560e01c80639366452c116100cd578063e525310511610081578063f301af4211610066578063f301af421461032b578063f7c618c11461033e578063f8738c251461035157600080fd5b8063e5253105146102f1578063ec87621c1461030457600080fd5b8063a217fddf116100b2578063a217fddf146102c3578063c4d66de8146102cb578063d547741f146102de57600080fd5b80639366452c146102895780639b87ab6d1461029c57600080fd5b80632f2ff15d1161012457806341f891a41161010957806341f891a4146101fc5780636d46379b1461023d57806391d148541461025057600080fd5b80632f2ff15d146101d657806336568abe146101e957600080fd5b8062501e281461015557806301ffc9a71461016a5780631ce92be514610192578063248a9ca3146101a5575b600080fd5b6101686101633660046133a8565b6103a6565b005b61017d6101783660046133f4565b61062b565b60405190151581526020015b60405180910390f35b6101686101a0366004613433565b610694565b6101c86101b336600461346c565b60009081526097602052604090206001015490565b604051908152602001610189565b6101686101e4366004613485565b610768565b6101686101f7366004613485565b61078d565b61022561020a3660046134aa565b60cc602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610189565b61017d61024b3660046134c7565b610819565b61017d61025e366004613485565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610168610297366004613523565b6108b3565b6101c87f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c281565b6101c8600081565b6101686102d93660046134aa565b610b77565b6101686102ec366004613485565b610d7c565b6101686102ff36600461355e565b610da1565b6101c87f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b6101c861033936600461346c565b610f02565b60c954610225906001600160a01b031681565b61038661035f36600461346c565b60cb6020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610189565b6103ae610f23565b600083815260cb6020526040902060018101546104125760405162461bcd60e51b815260206004820152601060248201527f526577617264206e6f7420666f756e640000000000000000000000000000000060448201526064015b60405180910390fd5b33600090815260cc60205260408120546001600160a01b0316610435573361044f565b33600090815260cc60205260409020546001600160a01b03165b604080516001600160a01b0383166020820152600291810191909152909150600090606001604051602081830303815290604052805190602001209050600061049e8460010154838888610f7c565b905060006ec097ce7bc90715b34b9f10000000008560030154836104c29190613596565b6104cc91906135c3565b905080856000015410156105225760405162461bcd60e51b815260206004820152601d60248201527f436c61696d20756e6465722d66756e6465642062792066756e6465722e0000006044820152606401610409565b600088815260cb6020908152604080832086845260040190915290205460ff161561058f5760405162461bcd60e51b815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152606401610409565b60008381526004860160205260409020805460ff1916600117905584546105b79082906135d7565b855560c9546105d0906001600160a01b03163383611019565b60c95460405182815289916001600160a01b0390811691908716907fceea116ca90ae38b5f3bcd7482763d0bdd5915faed2146d37b1e3bcd1ea425379060200160405180910390a4505050505061062660018055565b505050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061068e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086106be816110b0565b6001600160a01b038316158015906106de57506001600160a01b03821615155b61072a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420616464726573732070726f766964656400000000000000006044820152606401610409565b506001600160a01b03908116600090815260cc6020526040902080549190921673ffffffffffffffffffffffffffffffffffffffff19909116179055565b600082815260976020526040902060010154610783816110b0565b61062683836110bd565b6001600160a01b038116331461080b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610409565b610815828261115f565b5050565b600084815260cb602090815260408083206001015481516001600160a01b0388168185015260028184015282518082038401815260609091019092528151919092012081830361086e576000925050506108ab565b600087815260cb6020908152604080832084845260040190915290205460ff161580156108a6575060006108a483838888610f7c565b115b925050505b949350505050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086108dd816110b0565b8461092a5760405162461bcd60e51b815260206004820152601a60248201527f4d65726b6c6520726f6f742063616e6e6f74206265207a65726f0000000000006044820152606401610409565b600084815260cb6020526040902060018101541561098a5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6520726f6f742077617320616c726561647920706f7374656400006044820152606401610409565b60c9546040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1091906135ea565b9050600088118015610a225750808811155b610a945760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420616d6f756e74206f7220696e73756666696369656e74206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610409565b60c954610aac906001600160a01b031633308b6111e2565b878255600182018790556002820185905583610ad7896ec097ce7bc90715b34b9f1000000000613596565b610ae191906135c3565b600383015560ca80546001810182556000919091527f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee10186905560c954604080518a81526020810189905290810187905288916001600160a01b03169033907f4993e379e2a0a87975314480436d8f2de32d291a64892cb63cdb0839d09044369060600160405180910390a45050505050505050565b600054610100900460ff1615808015610b975750600054600160ff909116105b80610bb15750303b158015610bb1575060005460ff166001145b610c235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610409565b6000805460ff191660011790558015610c46576000805461ff0019166101001790555b610c4e611239565b610c566112ae565b6001600160a01b038216610cac5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e2063616e6e6f74206265207a65726f0000000000000000000000006044820152606401610409565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416179055610cdf6000336110bd565b610d097f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08336110bd565b610d337f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2336110bd565b8015610815576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260976020526040902060010154610d97816110b0565b610626838361115f565b7f7840a44bf6bbc1b45786ad46ece0694a9179b33e609d4ac4a51e6466e1f664c2610dcb816110b0565b600083815260cb602052604090206002810154421015610e2d5760405162461bcd60e51b815260206004820152601c60248201527f52657761726473206d6179206e6f742062652077697468647261776e000000006044820152606401610409565b8054831115610e7e5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610409565b82816000016000828254610e9291906135d7565b918290555082555060c954610eb1906001600160a01b03163385611019565b6001808201546040805187815260208101879052908101929092529033907f210aece5a2bb3ac8bbec4d3bd83444123ef037a899b89d617e735799f983e6b39060600160405180910390a350505050565b60ca8181548110610f1257600080fd5b600091825260209091200154905081565b600260015403610f755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610409565b6002600155565b600080610fbd610fb886604051602001610f9891815260200190565b60408051601f19818403018152919052610fb2868861364a565b89611319565b61133e565b905060005b815181101561100f57818181518110610fdd57610fdd61371f565b016020015160f81c610ff184610100613596565b610ffb9190613735565b92508061100781613748565b915050610fc2565b5050949350505050565b6040516001600160a01b0383166024820152604481018290526106269084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152611351565b60018055565b6110ba8133611439565b50565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155760008281526097602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561111b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff16156108155760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516001600160a01b03808516602483015283166044820152606481018290526112339085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161105e565b50505050565b600054610100900460ff166112a45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6112ac6114ae565b565b600054610100900460ff166112ac5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060600061132685611519565b905061133381858561154b565b9150505b9392505050565b606061068e61134c83611e67565b611f23565b60006113a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120589092919063ffffffff16565b90508051600014806113c75750808060200190518101906113c79190613761565b6106265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610409565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff166108155761146c81612067565b611477836020612079565b6040516020016114889291906137a7565b60408051601f198184030181529082905262461bcd60e51b825261040991600401613828565b600054610100900460ff166110aa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610409565b6060818051906020012060405160200161153591815260200190565b6040516020818303038152906040529050919050565b6060600084511161159e5760405162461bcd60e51b815260206004820152601560248201527f4d65726b6c65547269653a20656d707479206b657900000000000000000000006044820152606401610409565b60006115a98461225a565b905060006115b686612349565b90506000846040516020016115cd91815260200190565b60405160208183030381529060405290506000805b8451811015611df85760008582815181106115ff576115ff61371f565b6020026020010151905084518311156116805760405162461bcd60e51b815260206004820152602e60248201527f4d65726b6c65547269653a206b657920696e646578206578636565647320746f60448201527f74616c206b6579206c656e6774680000000000000000000000000000000000006064820152608401610409565b8260000361171f57805180516020918201206040516116ce926116a892910190815260200190565b604051602081830303815290604052858051602091820120825192909101919091201490565b61171a5760405162461bcd60e51b815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f7420686173680000006044820152606401610409565b611842565b8051516020116117bb5780518051602091820120604051611749926116a892910190815260200190565b61171a5760405162461bcd60e51b815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c2068617368000000000000000000000000000000000000000000000000006064820152608401610409565b8051845160208087019190912082519190920120146118425760405162461bcd60e51b815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f65206861736800000000000000000000000000000000000000000000000000006064820152608401610409565b61184e60106001613735565b816020015151036119fb578451830361199357600061188a826020015160108151811061187d5761187d61371f565b6020026020010151611f23565b905060008151116119035760405162461bcd60e51b815260206004820152603b60248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286272616e63682900000000006064820152608401610409565b6001875161191191906135d7565b83146119855760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286272616e6368290000000000006064820152608401610409565b965061133795505050505050565b60008584815181106119a7576119a761371f565b602001015160f81c60f81b60f81c9050600082602001518260ff16815181106119d2576119d261371f565b602002602001015190506119e5816123ac565b95506119f2600186613735565b94505050611de5565b600281602001515103611d77576000611a13826123d1565b9050600081600081518110611a2a57611a2a61371f565b016020015160f81c90506000611a4160028361385b565b611a4c90600261387d565b90506000611a5d848360ff166123f5565b90506000611a6b8a896123f5565b90506000611a79838361242b565b905080835114611af15760405162461bcd60e51b815260206004820152603a60248201527f4d65726b6c65547269653a20706174682072656d61696e646572206d7573742060448201527f736861726520616c6c206e6962626c65732077697468206b65790000000000006064820152608401610409565b60ff851660021480611b06575060ff85166003145b15611cac5780825114611b815760405162461bcd60e51b815260206004820152603d60248201527f4d65726b6c65547269653a206b65792072656d61696e646572206d757374206260448201527f65206964656e746963616c20746f20706174682072656d61696e6465720000006064820152608401610409565b6000611b9d886020015160018151811061187d5761187d61371f565b90506000815111611c165760405162461bcd60e51b815260206004820152603960248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286c65616629000000000000006064820152608401610409565b60018d51611c2491906135d7565b8914611c985760405162461bcd60e51b815260206004820152603860248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286c6561662900000000000000006064820152608401610409565b9c506113379b505050505050505050505050565b60ff85161580611cbf575060ff85166001145b15611cfe57611ceb8760200151600181518110611cde57611cde61371f565b60200260200101516123ac565b9950611cf7818a613735565b9850611d6c565b60405162461bcd60e51b815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e2070726566697800000000000000000000000000006064820152608401610409565b505050505050611de5565b60405162461bcd60e51b815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f64650000000000000000000000000000000000000000000000006064820152608401610409565b5080611df081613748565b9150506115e2565b5060405162461bcd60e51b815260206004820152602560248201527f4d65726b6c65547269653a2072616e206f7574206f662070726f6f6620656c6560448201527f6d656e74730000000000000000000000000000000000000000000000000000006064820152608401610409565b60408051808201909152600080825260208201526000825111611f055760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b50604080518082019091528151815260209182019181019190915290565b60606000806000611f33856124aa565b919450925090506000816001811115611f4e57611f4e613896565b14611fc15760405162461bcd60e51b815260206004820152603960248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206279746573206973206e6f7420612064617461206974656d000000000000006064820152608401610409565b611fcb8284613735565b8551146120405760405162461bcd60e51b815260206004820152603460248201527f524c505265616465723a2062797465732076616c756520636f6e7461696e732060448201527f616e20696e76616c69642072656d61696e6465720000000000000000000000006064820152608401610409565b61204f85602001518484612d6c565b95945050505050565b60606108ab8484600085612e0d565b606061068e6001600160a01b03831660145b60606000612088836002613596565b612093906002613735565b67ffffffffffffffff8111156120ab576120ab613603565b6040519080825280601f01601f1916602001820160405280156120d5576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061210c5761210c61371f565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106121575761215761371f565b60200101906001600160f81b031916908160001a905350600061217b846002613596565b612186906001613735565b90505b600181111561220b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106121c7576121c761371f565b1a60f81b8282815181106121dd576121dd61371f565b60200101906001600160f81b031916908160001a90535060049490941c93612204816138ac565b9050612189565b5083156113375760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610409565b805160609060008167ffffffffffffffff81111561227a5761227a613603565b6040519080825280602002602001820160405280156122bf57816020015b60408051808201909152606080825260208201528152602001906001900390816122985790505b50905060005b828110156123415760405180604001604052808683815181106122ea576122ea61371f565b6020026020010151815260200161231987848151811061230c5761230c61371f565b6020026020010151612ef4565b81525082828151811061232e5761232e61371f565b60209081029190910101526001016122c5565b509392505050565b606080604051905082518060011b603f8101601f1916830160405280835250602084016020830160005b838110156123a1578060011b82018184015160001a8060041c8253600f811660018301535050600101612373565b509295945050505050565b606060208260000151106123c8576123c382611f23565b61068e565b61068e82612f07565b606061068e6123f0836020015160008151811061187d5761187d61371f565b612349565b606082518210612414575060408051602081019091526000815261068e565b611337838384865161242691906135d7565b612f1d565b60008060008351855110612440578351612443565b84515b90505b808210801561249a57508382815181106124625761246261371f565b602001015160f81c60f81b6001600160f81b0319168583815181106124895761248961371f565b01602001516001600160f81b031916145b1561234157816001019150612446565b60008060008084600001511161253b5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f206265606482015269206465636f6461626c6560b01b608482015260a401610409565b6020840151805160001a607f8111612560576000600160009450945094505050612d65565b60b7811161270a5760006125756080836135d7565b9050808760000151116126165760405162461bcd60e51b815260206004820152604e60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20737472696e67206c656e6774682060648201527f2873686f727420737472696e6729000000000000000000000000000000000000608482015260a401610409565b6001838101516001600160f81b031916908214158061265f57507f80000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610155b6126f75760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a20696e76616c6964207072656669782c2073696e676c60448201527f652062797465203c203078383020617265206e6f74207072656669786564202860648201527f73686f727420737472696e672900000000000000000000000000000000000000608482015260a401610409565b5060019550935060009250612d65915050565b60bf81116129d857600061271f60b7836135d7565b9050808760000151116127c05760405162461bcd60e51b815260206004820152605160248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f6620737472696e67206c656e60648201527f67746820286c6f6e6720737472696e6729000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b031916600081900361286c5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e6720737472696e672900000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c603781116129165760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f20737472696e6729000000000000000000000000000000000000000000000000608482015260a401610409565b6129208184613735565b8951116129bb5760405162461bcd60e51b815260206004820152604c60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e6720737472696e67290000000000000000000000000000000000000000608482015260a401610409565b6129c6836001613735565b9750955060009450612d659350505050565b60f78111612a9f5760006129ed60c0836135d7565b905080876000015111612a8e5760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e206c697374206c656e67746820287360648201527f686f7274206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b600195509350849250612d65915050565b6000612aac60f7836135d7565b905080876000015111612b4d5760405162461bcd60e51b815260206004820152604d60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f66206c697374206c656e677460648201527f6820286c6f6e67206c6973742900000000000000000000000000000000000000608482015260a401610409565b60018301516001600160f81b0319166000819003612bf95760405162461bcd60e51b815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e67206c69737429000000000000000000000000000000000000000000000000608482015260a401610409565b600184015160088302610100031c60378111612ca35760405162461bcd60e51b815260206004820152604660248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f206c697374290000000000000000000000000000000000000000000000000000608482015260a401610409565b612cad8184613735565b895111612d485760405162461bcd60e51b815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e67206c6973742900000000000000000000000000000000000000000000608482015260a401610409565b612d53836001613735565b9750955060019450612d659350505050565b9193909250565b606060008267ffffffffffffffff811115612d8957612d89613603565b6040519080825280601f01601f191660200182016040528015612db3576020820181803683370190505b50905082600003612dc5579050611337565b6000612dd18587613735565b90506020820160005b85811015612df2578281015182820152602001612dda565b85811115612e01576000868301525b50919695505050505050565b606082471015612e855760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610409565b600080866001600160a01b03168587604051612ea191906138c3565b60006040518083038185875af1925050503d8060008114612ede576040519150601f19603f3d011682016040523d82523d6000602084013e612ee3565b606091505b50915091506108a687838387613089565b606061068e612f0283611e67565b613102565b606061068e826020015160008460000151612d6c565b60608182601f011015612f725760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b828284011015612fc45760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610409565b818301845110156130175760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610409565b6060821580156130365760405191506000825260208201604052613080565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561306f578051835260209283019201613057565b5050858452601f01601f1916604052505b50949350505050565b606083156130f85782516000036130f1576001600160a01b0385163b6130f15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610409565b50816108ab565b6108ab8383613332565b60606000806000613112856124aa565b91945092509050600181600181111561312d5761312d613896565b146131a05760405162461bcd60e51b815260206004820152603860248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206c697374206973206e6f742061206c697374206974656d00000000000000006064820152608401610409565b84516131ac8385613735565b1461321f5760405162461bcd60e51b815260206004820152603260248201527f524c505265616465723a206c697374206974656d2068617320616e20696e766160448201527f6c696420646174612072656d61696e64657200000000000000000000000000006064820152608401610409565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816132385790505090506000845b8751811015613326576000806132ab6040518060400160405280858d6000015161328f91906135d7565b8152602001858d602001516132a49190613735565b90526124aa565b5091509150604051806040016040528083836132c79190613735565b8152602001848c602001516132dc9190613735565b8152508585815181106132f1576132f161371f565b6020908102919091010152613307600185613735565b93506133138183613735565b61331d9084613735565b92505050613265565b50815295945050505050565b8151156133425781518083602001fd5b8060405162461bcd60e51b81526004016104099190613828565b60008083601f84011261336e57600080fd5b50813567ffffffffffffffff81111561338657600080fd5b6020830191508360208260051b85010111156133a157600080fd5b9250929050565b6000806000604084860312156133bd57600080fd5b83359250602084013567ffffffffffffffff8111156133db57600080fd5b6133e78682870161335c565b9497909650939450505050565b60006020828403121561340657600080fd5b81356001600160e01b03198116811461133757600080fd5b6001600160a01b03811681146110ba57600080fd5b6000806040838503121561344657600080fd5b82356134518161341e565b915060208301356134618161341e565b809150509250929050565b60006020828403121561347e57600080fd5b5035919050565b6000806040838503121561349857600080fd5b8235915060208301356134618161341e565b6000602082840312156134bc57600080fd5b81356113378161341e565b600080600080606085870312156134dd57600080fd5b8435935060208501356134ef8161341e565b9250604085013567ffffffffffffffff81111561350b57600080fd5b6135178782880161335c565b95989497509550505050565b600080600080600060a0868803121561353b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561357157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761068e5761068e613580565b634e487b7160e01b600052601260045260246000fd5b6000826135d2576135d26135ad565b500490565b8181038181111561068e5761068e613580565b6000602082840312156135fc57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561364257613642613603565b604052919050565b600067ffffffffffffffff8084111561366557613665613603565b8360051b6020613676818301613619565b86815291850191818101903684111561368e57600080fd5b865b84811015613713578035868111156136a85760008081fd5b8801601f36818301126136bb5760008081fd5b8135888111156136cd576136cd613603565b6136de818301601f19168801613619565b915080825236878285010111156136f55760008081fd5b80878401888401376000908201870152845250918301918301613690565b50979650505050505050565b634e487b7160e01b600052603260045260246000fd5b8082018082111561068e5761068e613580565b60006001820161375a5761375a613580565b5060010190565b60006020828403121561377357600080fd5b8151801515811461133757600080fd5b60005b8381101561379e578181015183820152602001613786565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516137df816017850160208801613783565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161381c816028840160208801613783565b01602801949350505050565b6020815260008251806020840152613847816040850160208701613783565b601f01601f19169190910160400192915050565b600060ff83168061386e5761386e6135ad565b8060ff84160691505092915050565b60ff828116828216039081111561068e5761068e613580565b634e487b7160e01b600052602160045260246000fd5b6000816138bb576138bb613580565b506000190190565b600082516138d5818460208701613783565b919091019291505056fea26469706673582212206ee24dc634614d6c6959f24d9ce7efdb5cc31b9c48a186879cff6877a676180f64736f6c63430008130033"; type SonneMerkleDistributorConstructorParams = | [signer?: Signer] diff --git a/deployments/base/BaseRewardManager.json b/deployments/base/BaseRewardManager.json index 3b040c7..143bf45 100644 --- a/deployments/base/BaseRewardManager.json +++ b/deployments/base/BaseRewardManager.json @@ -449,6 +449,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "setDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "sonne", @@ -644,12 +662,12 @@ "0x2810ced10BeDe0507019Ab185f308cc9012552ec", "0x8129fc1c" ], - "numDeployments": 2, + "numDeployments": 3, "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", - "implementation": "0x6FdaA57610FdaE0786fCFfb019762828DA3d27C6", + "implementation": "0xCA0f0d2FAFFc419076EB518e2A18EaCe07884d4B", "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", diff --git a/deployments/base/BaseRewardManager_Implementation.json b/deployments/base/BaseRewardManager_Implementation.json index 28c3d70..997d7d1 100644 --- a/deployments/base/BaseRewardManager_Implementation.json +++ b/deployments/base/BaseRewardManager_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x6FdaA57610FdaE0786fCFfb019762828DA3d27C6", + "address": "0xCA0f0d2FAFFc419076EB518e2A18EaCe07884d4B", "abi": [ { "anonymous": false, @@ -326,6 +326,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "setDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "sonne", @@ -411,28 +429,28 @@ "type": "function" } ], - "transactionHash": "0x828a4494b72062a4698c2e564202d54c2672f83151fda27d59ffe592da83cbd2", + "transactionHash": "0x13a95269f3853c66395191961377808f5d6d7d484bf9a24e5e80f2b42107aea9", "receipt": { "to": null, "from": "0xFb59Ce8986943163F14C590755b29dB2998F2322", - "contractAddress": "0x6FdaA57610FdaE0786fCFfb019762828DA3d27C6", + "contractAddress": "0xCA0f0d2FAFFc419076EB518e2A18EaCe07884d4B", "transactionIndex": 4, - "gasUsed": "1246631", + "gasUsed": "1367208", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1eae2afd2113cf7f3d02cb97d7ced0b2a4d2b4a220db530ad5100109f5bdd3c3", - "transactionHash": "0x828a4494b72062a4698c2e564202d54c2672f83151fda27d59ffe592da83cbd2", + "blockHash": "0x38914d42e4e3164c446e0b3fbb4617b1fe28c31aaf2fa05cce8fd962186a7245", + "transactionHash": "0x13a95269f3853c66395191961377808f5d6d7d484bf9a24e5e80f2b42107aea9", "logs": [], - "blockNumber": 4505988, - "cumulativeGasUsed": "1668838", + "blockNumber": 5637334, + "cumulativeGasUsed": "1789643", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 2, - "solcInputHash": "4aa140eda36e680d8535e73838583e11", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MANAGER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"usdcAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"aeroAmount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"sMerkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"uMerkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"sSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"uSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawUnlockTime\",\"type\":\"uint256\"}],\"internalType\":\"struct OpPoolState\",\"name\":\"state\",\"type\":\"tuple\"}],\"name\":\"addRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aero\",\"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\":\"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\":\"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\":\"router\",\"outputs\":[{\"internalType\":\"contract IRouter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sAeroDistributor\",\"outputs\":[{\"internalType\":\"contract ISonneMerkleDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sSonneDistributor\",\"outputs\":[{\"internalType\":\"contract ISonneMerkleDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sonne\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uAeroDistributor\",\"outputs\":[{\"internalType\":\"contract ISonneMerkleDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uUsdcDistributor\",\"outputs\":[{\"internalType\":\"contract ISonneMerkleDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"usdbc\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"usdc\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/BaseRewardManager.sol\":\"BaseRewardManager\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/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/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\"},\"contracts/BaseRewardManager.sol\":{\"content\":\"//SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.10;\\n\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\n\\nimport './interfaces/AerodromeInterfaces.sol';\\nimport './interfaces/SonneMerkleDistributorInterfaces.sol';\\nimport './libraries/SafeToken.sol';\\n\\nstruct OpPoolState {\\n bytes32 sMerkleRoot;\\n bytes32 uMerkleRoot;\\n uint256 sSupply;\\n uint256 uSupply;\\n uint256 blockNumber;\\n uint256 withdrawUnlockTime;\\n}\\n\\ncontract BaseRewardManager is AccessControlUpgradeable {\\n using SafeToken for address;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE');\\n\\n ISonneMerkleDistributor public constant sSonneDistributor =\\n ISonneMerkleDistributor(0x071B00ef6AD31Fb716955a1d70Ab26D47290120a);\\n ISonneMerkleDistributor public constant uUsdcDistributor =\\n ISonneMerkleDistributor(0x6cbDABf17c4634fA4F9A0C4A5e73Fd869F9a9be8);\\n ISonneMerkleDistributor public constant sAeroDistributor =\\n ISonneMerkleDistributor(0xA1918c958963DC7E710F5736A7fbCa7C32Bf501d);\\n ISonneMerkleDistributor public constant uAeroDistributor =\\n ISonneMerkleDistributor(0xcA31a8173AB19c3fa006D0Adc2883882F189797b);\\n\\n address public constant sonne = 0x22a2488fE295047Ba13BD8cCCdBC8361DBD8cf7c;\\n address public constant usdc = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913;\\n address public constant usdbc = 0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA;\\n address public constant aero = 0x940181a94A35A4569E4529A3CDfB74e38FD98631;\\n\\n IRouter public constant router = IRouter(0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43);\\n\\n function initialize() public initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _grantRole(MANAGER_ROLE, _msgSender());\\n }\\n\\n function addRewards(\\n uint256 usdcAmount,\\n uint256 aeroAmount,\\n OpPoolState calldata state\\n ) public onlyRole(MANAGER_ROLE) {\\n uint256 totalSupply = state.sSupply + state.uSupply;\\n\\n // add velo\\n if (aeroAmount > 0) {\\n pullTokenInternal(aero, aeroAmount);\\n uint256 amount = aero.balanceOf(address(this));\\n\\n uint256 uAmount = (amount * state.uSupply) / totalSupply;\\n uint256 sAmount = amount - uAmount;\\n\\n // add for uSonne\\n aero.safeApprove(address(uAeroDistributor), uAmount);\\n uAeroDistributor.addReward(\\n uAmount,\\n state.uMerkleRoot,\\n state.blockNumber,\\n state.withdrawUnlockTime,\\n state.uSupply\\n );\\n\\n // add for sSonne\\n aero.safeApprove(address(sAeroDistributor), sAmount);\\n sAeroDistributor.addReward(\\n sAmount,\\n state.sMerkleRoot,\\n state.blockNumber,\\n state.withdrawUnlockTime,\\n state.sSupply\\n );\\n }\\n\\n // add usdc\\n if (usdcAmount > 0) {\\n pullTokenInternal(usdc, usdcAmount);\\n uint256 amount = usdc.balanceOf(address(this));\\n\\n uint256 uUSDCAmount = (amount * state.uSupply) / totalSupply;\\n uint256 sUSDCAmount = amount - uUSDCAmount;\\n\\n // add usdc for uSonne\\n usdc.safeApprove(address(uUsdcDistributor), uUSDCAmount);\\n uUsdcDistributor.addReward(\\n uUSDCAmount,\\n state.uMerkleRoot,\\n state.blockNumber,\\n state.withdrawUnlockTime,\\n state.uSupply\\n );\\n\\n // swap usdc to sonne\\n swapUSDCtoSonneInternal(sUSDCAmount);\\n\\n // add sonne for sSonne\\n uint256 sonneAmount = sonne.balanceOf(address(this));\\n sonne.safeApprove(address(sSonneDistributor), sonneAmount);\\n sSonneDistributor.addReward(\\n sonneAmount,\\n state.sMerkleRoot,\\n state.blockNumber,\\n state.withdrawUnlockTime,\\n state.sSupply\\n );\\n }\\n }\\n\\n function pullTokenInternal(address token, uint256 amount) internal {\\n if (amount == type(uint256).max) {\\n amount = token.balanceOf(msg.sender);\\n }\\n\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n function swapUSDCtoSonneInternal(uint256 usdcAmount) internal {\\n IRouter.Route[] memory path = new IRouter.Route[](2);\\n path[0] = IRouter.Route({from: usdc, to: usdbc, stable: true, factory: address(0)});\\n path[1] = IRouter.Route({from: usdbc, to: sonne, stable: false, factory: address(0)});\\n\\n usdc.safeApprove(address(router), usdcAmount);\\n router.swapExactTokensForTokens(usdcAmount, 0, path, address(this), block.timestamp);\\n }\\n}\\n\",\"keccak256\":\"0x8787cce6558344131e23dd5a259dded469d7f948e84501f9953168b19451b11e\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/AerodromeInterfaces.sol\":{\"content\":\"//SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.10;\\n\\ninterface IRouter {\\n struct Route {\\n address from;\\n address to;\\n bool stable;\\n address factory;\\n }\\n\\n function swapExactTokensForTokens(\\n uint amountIn,\\n uint amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint deadline\\n ) external;\\n}\\n\\ninterface IVoter {\\n function gauges(address pair) external view returns (address gauge);\\n}\\n\\ninterface IGauge {\\n function stake() external view returns (address token);\\n\\n function balanceOf(address account) external view returns (uint256 amount);\\n\\n function deposit(uint256 amount, uint256 tokenId) external;\\n\\n function depositAll(uint256 tokenId) external;\\n\\n function withdrawAll() external;\\n\\n function withdraw(uint256 amount) external;\\n\\n function getReward(address account, address[] memory tokens) external;\\n}\\n\",\"keccak256\":\"0xbf9efda43a7beeea8835ac2ad4c4e32a8334f0813f92461a62feb602732afa28\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/SonneMerkleDistributorInterfaces.sol\":{\"content\":\"//SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.10;\\n\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface ISonneMerkleDistributor {\\n event NewMerkle(\\n address indexed creator,\\n address indexed rewardToken,\\n uint256 amount,\\n bytes32 indexed merkleRoot,\\n uint256 blockNr,\\n uint256 withdrawUnlockTime\\n );\\n\\n function rewardToken() external view returns (IERC20);\\n\\n function Rewards(\\n uint256 blockNumber\\n ) external view returns (uint256 balance, bytes32 merkleRoot, uint256 withdrawUnlockTime, uint256 ratio);\\n\\n function addReward(\\n uint256 amount,\\n bytes32 merkleRoot,\\n uint256 blockNumber,\\n uint256 withdrawUnlockTime,\\n uint256 totalStakedBalance\\n ) external;\\n\\n // For testing\\n\\n function grantRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xa6dec09981b7fd4dabf4bc5666e68eb8d6b0908a83dabaa4d90b09760e79b16f\",\"license\":\"UNLICENSED\"},\"contracts/libraries/SafeToken.sol\":{\"content\":\"//SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.10;\\n\\ninterface ERC20Interface {\\n function balanceOf(address user) external view returns (uint256);\\n}\\n\\nlibrary SafeToken {\\n function myBalance(address token) internal view returns (uint256) {\\n return ERC20Interface(token).balanceOf(address(this));\\n }\\n\\n function balanceOf(address token, address user) internal view returns (uint256) {\\n return ERC20Interface(token).balanceOf(user);\\n }\\n\\n function safeApprove(\\n address token,\\n address to,\\n uint256 value\\n ) internal {\\n // bytes4(keccak256(bytes('approve(address,uint256)')));\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeApprove');\\n }\\n\\n function safeTransfer(\\n address token,\\n address to,\\n uint256 value\\n ) internal {\\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeTransfer');\\n }\\n\\n function safeTransferFrom(\\n address token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeTransferFrom');\\n }\\n\\n function safeTransferETH(address to, uint256 value) internal {\\n (bool success, ) = to.call{value: value}(new bytes(0));\\n require(success, '!safeTransferETH');\\n }\\n}\\n\",\"keccak256\":\"0x1468e397846220330a392e7cacaf9a7863cb4c26ec87b1883cb1c7a962b21a77\",\"license\":\"UNLICENSED\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50611597806100206000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80638129fc1c116100ad578063c0c2ae5011610071578063c0c2ae5014610297578063ca45283b146102b2578063d547741f146102cd578063ec87621c146102e0578063f887ea401461030757600080fd5b80638129fc1c1461023e57806386f0abde1461024657806391d14854146102615780639bbb348914610274578063a217fddf1461028f57600080fd5b806326837eda116100f457806326837eda146101c75780632f2ff15d146101e257806336568abe146101f55780633e413bee146102085780634648e89a1461022357600080fd5b806301ffc9a7146101265780630bc798d21461014e5780630e1d682514610181578063248a9ca314610196575b600080fd5b610139610134366004611206565b610322565b60405190151581526020015b60405180910390f35b61016973d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca81565b6040516001600160a01b039091168152602001610145565b61019461018f366004611230565b610359565b005b6101b96101a4366004611272565b60009081526065602052604090206001015490565b604051908152602001610145565b61016973940181a94a35a4569e4529a3cdfb74e38fd9863181565b6101946101f036600461128b565b6107b3565b61019461020336600461128b565b6107dd565b61016973833589fcd6edb6e08f4c7c32d4f71b54bda0291381565b61016973a1918c958963dc7e710f5736a7fbca7c32bf501d81565b610194610860565b610169736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be881565b61013961026f36600461128b565b6109a6565b61016973071b00ef6ad31fb716955a1d70ab26d47290120a81565b6101b9600081565b6101697322a2488fe295047ba13bd8cccdbc8361dbd8cf7c81565b61016973ca31a8173ab19c3fa006d0adc2883882f189797b81565b6101946102db36600461128b565b6109d1565b6101b97f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b61016973cf77a3ba9a5ca399b7c97c74d54e5b1beb874e4381565b60006001600160e01b03198216637965db0b60e01b148061035357506301ffc9a760e01b6001600160e01b03198316145b92915050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08610383816109f6565b6000610397606084013560408501356112dd565b9050831561058e576103bd73940181a94a35a4569e4529a3cdfb74e38fd9863185610a00565b60006103dd73940181a94a35a4569e4529a3cdfb74e38fd9863130610a35565b90506000826103f06060870135846112f5565b6103fa9190611314565b905060006104088284611336565b905061043d73940181a94a35a4569e4529a3cdfb74e38fd9863173ca31a8173ab19c3fa006d0adc2883882f189797b84610aaa565b6040516324d9914b60e21b815260048101839052602087013560248201526080870135604482015260a087013560648201526060870135608482015273ca31a8173ab19c3fa006d0adc2883882f189797b90639366452c9060a401600060405180830381600087803b1580156104b257600080fd5b505af11580156104c6573d6000803e3d6000fd5b50610500925073940181a94a35a4569e4529a3cdfb74e38fd98631915073a1918c958963dc7e710f5736a7fbca7c32bf501d905083610aaa565b604080516324d9914b60e21b815260048101839052873560248201526080880135604482015260a0880135606482015290870135608482015273a1918c958963dc7e710f5736a7fbca7c32bf501d90639366452c9060a401600060405180830381600087803b15801561057257600080fd5b505af1158015610586573d6000803e3d6000fd5b505050505050505b84156107ac576105b273833589fcd6edb6e08f4c7c32d4f71b54bda0291386610a00565b60006105d273833589fcd6edb6e08f4c7c32d4f71b54bda0291330610a35565b90506000826105e56060870135846112f5565b6105ef9190611314565b905060006105fd8284611336565b905061063273833589fcd6edb6e08f4c7c32d4f71b54bda02913736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be884610aaa565b6040516324d9914b60e21b815260048101839052602087013560248201526080870135604482015260a0870135606482015260608701356084820152736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be890639366452c9060a401600060405180830381600087803b1580156106a757600080fd5b505af11580156106bb573d6000803e3d6000fd5b505050506106c881610bad565b60006106e87322a2488fe295047ba13bd8cccdbc8361dbd8cf7c30610a35565b905061071d7322a2488fe295047ba13bd8cccdbc8361dbd8cf7c73071b00ef6ad31fb716955a1d70ab26d47290120a83610aaa565b604080516324d9914b60e21b815260048101839052883560248201526080890135604482015260a0890135606482015290880135608482015273071b00ef6ad31fb716955a1d70ab26d47290120a90639366452c9060a401600060405180830381600087803b15801561078f57600080fd5b505af11580156107a3573d6000803e3d6000fd5b50505050505050505b5050505050565b6000828152606560205260409020600101546107ce816109f6565b6107d88383610d95565b505050565b6001600160a01b03811633146108525760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61085c8282610e1b565b5050565b600054610100900460ff16158080156108805750600054600160ff909116105b8061089a5750303b15801561089a575060005460ff166001145b6108fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610849565b6000805460ff191660011790558015610920576000805461ff0019166101001790555b610928610e82565b610933600033610d95565b61095d7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0833610d95565b80156109a3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546109ec816109f6565b6107d88383610e1b565b6109a38133610eef565b600019811415610a2057610a1d6001600160a01b03831633610a35565b90505b61085c6001600160a01b038316333084610f48565b6040516370a0823160e01b81526001600160a01b038281166004830152600091908416906370a0823190602401602060405180830381865afa158015610a7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa3919061134d565b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839290871691610b069190611396565b6000604051808303816000865af19150503d8060008114610b43576040519150601f19603f3d011682016040523d82523d6000602084013e610b48565b606091505b5091509150818015610b72575080511580610b72575080806020019051810190610b7291906113b2565b6107ac5760405162461bcd60e51b815260206004820152600c60248201526b2173616665417070726f766560a01b6044820152606401610849565b60408051600280825260608201909252600091816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610bc55750506040805160808101825273833589fcd6edb6e08f4c7c32d4f71b54bda02913815273d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca602082015260019181019190915260006060820181905282519293509091839190610c5b57610c5b6113ea565b6020026020010181905250604051806080016040528073d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca6001600160a01b031681526020017322a2488fe295047ba13bd8cccdbc8361dbd8cf7c6001600160a01b0316815260200160001515815260200160006001600160a01b031681525081600181518110610ce157610ce16113ea565b6020908102919091010152610d1f73833589fcd6edb6e08f4c7c32d4f71b54bda0291373cf77a3ba9a5ca399b7c97c74d54e5b1beb874e4384610aaa565b60405163cac88ea960e01b815273cf77a3ba9a5ca399b7c97c74d54e5b1beb874e439063cac88ea990610d5f908590600090869030904290600401611400565b600060405180830381600087803b158015610d7957600080fd5b505af1158015610d8d573d6000803e3d6000fd5b505050505050565b610d9f82826109a6565b61085c5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dd73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610e2582826109a6565b1561085c5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600054610100900460ff16610eed5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610849565b565b610ef982826109a6565b61085c57610f0681611058565b610f1183602061106a565b604051602001610f229291906114a2565b60408051601f198184030181529082905262461bcd60e51b825261084991600401611517565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691610fac9190611396565b6000604051808303816000865af19150503d8060008114610fe9576040519150601f19603f3d011682016040523d82523d6000602084013e610fee565b606091505b509150915081801561101857508051158061101857508080602001905181019061101891906113b2565b610d8d5760405162461bcd60e51b815260206004820152601160248201527021736166655472616e7366657246726f6d60781b6044820152606401610849565b60606103536001600160a01b03831660145b606060006110798360026112f5565b6110849060026112dd565b67ffffffffffffffff81111561109c5761109c6113d4565b6040519080825280601f01601f1916602001820160405280156110c6576020820181803683370190505b509050600360fc1b816000815181106110e1576110e16113ea565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611110576111106113ea565b60200101906001600160f81b031916908160001a90535060006111348460026112f5565b61113f9060016112dd565b90505b60018111156111b7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611173576111736113ea565b1a60f81b828281518110611189576111896113ea565b60200101906001600160f81b031916908160001a90535060049490941c936111b08161154a565b9050611142565b508315610aa35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610849565b60006020828403121561121857600080fd5b81356001600160e01b031981168114610aa357600080fd5b600080600083850361010081121561124757600080fd5b843593506020850135925060c0603f198201121561126457600080fd5b506040840190509250925092565b60006020828403121561128457600080fd5b5035919050565b6000806040838503121561129e57600080fd5b8235915060208301356001600160a01b03811681146112bc57600080fd5b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082198211156112f0576112f06112c7565b500190565b600081600019048311821515161561130f5761130f6112c7565b500290565b60008261133157634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611348576113486112c7565b500390565b60006020828403121561135f57600080fd5b5051919050565b60005b83811015611381578181015183820152602001611369565b83811115611390576000848401525b50505050565b600082516113a8818460208701611366565b9190910192915050565b6000602082840312156113c457600080fd5b81518015158114610aa357600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060a0820187835260208781850152604060a08186015282885180855260c087019150838a01945060005b8181101561147657855180516001600160a01b039081168552868201518116878601528582015115158686015260609182015116908401529484019460809092019160010161142c565b50506001600160a01b0388166060870152935061149292505050565b8260808301529695505050505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516114da816017850160208801611366565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161150b816028840160208801611366565b01602801949350505050565b6020815260008251806020840152611536816040850160208701611366565b601f01601f19169190910160400192915050565b600081611559576115596112c7565b50600019019056fea264697066735822122037119e7b72d1abb0d63bd337013d9451209f9e9c7e903b61edd2c2fb97fa42da64736f6c634300080a0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c80638129fc1c116100ad578063c0c2ae5011610071578063c0c2ae5014610297578063ca45283b146102b2578063d547741f146102cd578063ec87621c146102e0578063f887ea401461030757600080fd5b80638129fc1c1461023e57806386f0abde1461024657806391d14854146102615780639bbb348914610274578063a217fddf1461028f57600080fd5b806326837eda116100f457806326837eda146101c75780632f2ff15d146101e257806336568abe146101f55780633e413bee146102085780634648e89a1461022357600080fd5b806301ffc9a7146101265780630bc798d21461014e5780630e1d682514610181578063248a9ca314610196575b600080fd5b610139610134366004611206565b610322565b60405190151581526020015b60405180910390f35b61016973d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca81565b6040516001600160a01b039091168152602001610145565b61019461018f366004611230565b610359565b005b6101b96101a4366004611272565b60009081526065602052604090206001015490565b604051908152602001610145565b61016973940181a94a35a4569e4529a3cdfb74e38fd9863181565b6101946101f036600461128b565b6107b3565b61019461020336600461128b565b6107dd565b61016973833589fcd6edb6e08f4c7c32d4f71b54bda0291381565b61016973a1918c958963dc7e710f5736a7fbca7c32bf501d81565b610194610860565b610169736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be881565b61013961026f36600461128b565b6109a6565b61016973071b00ef6ad31fb716955a1d70ab26d47290120a81565b6101b9600081565b6101697322a2488fe295047ba13bd8cccdbc8361dbd8cf7c81565b61016973ca31a8173ab19c3fa006d0adc2883882f189797b81565b6101946102db36600461128b565b6109d1565b6101b97f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b61016973cf77a3ba9a5ca399b7c97c74d54e5b1beb874e4381565b60006001600160e01b03198216637965db0b60e01b148061035357506301ffc9a760e01b6001600160e01b03198316145b92915050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08610383816109f6565b6000610397606084013560408501356112dd565b9050831561058e576103bd73940181a94a35a4569e4529a3cdfb74e38fd9863185610a00565b60006103dd73940181a94a35a4569e4529a3cdfb74e38fd9863130610a35565b90506000826103f06060870135846112f5565b6103fa9190611314565b905060006104088284611336565b905061043d73940181a94a35a4569e4529a3cdfb74e38fd9863173ca31a8173ab19c3fa006d0adc2883882f189797b84610aaa565b6040516324d9914b60e21b815260048101839052602087013560248201526080870135604482015260a087013560648201526060870135608482015273ca31a8173ab19c3fa006d0adc2883882f189797b90639366452c9060a401600060405180830381600087803b1580156104b257600080fd5b505af11580156104c6573d6000803e3d6000fd5b50610500925073940181a94a35a4569e4529a3cdfb74e38fd98631915073a1918c958963dc7e710f5736a7fbca7c32bf501d905083610aaa565b604080516324d9914b60e21b815260048101839052873560248201526080880135604482015260a0880135606482015290870135608482015273a1918c958963dc7e710f5736a7fbca7c32bf501d90639366452c9060a401600060405180830381600087803b15801561057257600080fd5b505af1158015610586573d6000803e3d6000fd5b505050505050505b84156107ac576105b273833589fcd6edb6e08f4c7c32d4f71b54bda0291386610a00565b60006105d273833589fcd6edb6e08f4c7c32d4f71b54bda0291330610a35565b90506000826105e56060870135846112f5565b6105ef9190611314565b905060006105fd8284611336565b905061063273833589fcd6edb6e08f4c7c32d4f71b54bda02913736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be884610aaa565b6040516324d9914b60e21b815260048101839052602087013560248201526080870135604482015260a0870135606482015260608701356084820152736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be890639366452c9060a401600060405180830381600087803b1580156106a757600080fd5b505af11580156106bb573d6000803e3d6000fd5b505050506106c881610bad565b60006106e87322a2488fe295047ba13bd8cccdbc8361dbd8cf7c30610a35565b905061071d7322a2488fe295047ba13bd8cccdbc8361dbd8cf7c73071b00ef6ad31fb716955a1d70ab26d47290120a83610aaa565b604080516324d9914b60e21b815260048101839052883560248201526080890135604482015260a0890135606482015290880135608482015273071b00ef6ad31fb716955a1d70ab26d47290120a90639366452c9060a401600060405180830381600087803b15801561078f57600080fd5b505af11580156107a3573d6000803e3d6000fd5b50505050505050505b5050505050565b6000828152606560205260409020600101546107ce816109f6565b6107d88383610d95565b505050565b6001600160a01b03811633146108525760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61085c8282610e1b565b5050565b600054610100900460ff16158080156108805750600054600160ff909116105b8061089a5750303b15801561089a575060005460ff166001145b6108fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610849565b6000805460ff191660011790558015610920576000805461ff0019166101001790555b610928610e82565b610933600033610d95565b61095d7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0833610d95565b80156109a3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546109ec816109f6565b6107d88383610e1b565b6109a38133610eef565b600019811415610a2057610a1d6001600160a01b03831633610a35565b90505b61085c6001600160a01b038316333084610f48565b6040516370a0823160e01b81526001600160a01b038281166004830152600091908416906370a0823190602401602060405180830381865afa158015610a7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa3919061134d565b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839290871691610b069190611396565b6000604051808303816000865af19150503d8060008114610b43576040519150601f19603f3d011682016040523d82523d6000602084013e610b48565b606091505b5091509150818015610b72575080511580610b72575080806020019051810190610b7291906113b2565b6107ac5760405162461bcd60e51b815260206004820152600c60248201526b2173616665417070726f766560a01b6044820152606401610849565b60408051600280825260608201909252600091816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610bc55750506040805160808101825273833589fcd6edb6e08f4c7c32d4f71b54bda02913815273d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca602082015260019181019190915260006060820181905282519293509091839190610c5b57610c5b6113ea565b6020026020010181905250604051806080016040528073d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca6001600160a01b031681526020017322a2488fe295047ba13bd8cccdbc8361dbd8cf7c6001600160a01b0316815260200160001515815260200160006001600160a01b031681525081600181518110610ce157610ce16113ea565b6020908102919091010152610d1f73833589fcd6edb6e08f4c7c32d4f71b54bda0291373cf77a3ba9a5ca399b7c97c74d54e5b1beb874e4384610aaa565b60405163cac88ea960e01b815273cf77a3ba9a5ca399b7c97c74d54e5b1beb874e439063cac88ea990610d5f908590600090869030904290600401611400565b600060405180830381600087803b158015610d7957600080fd5b505af1158015610d8d573d6000803e3d6000fd5b505050505050565b610d9f82826109a6565b61085c5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dd73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610e2582826109a6565b1561085c5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600054610100900460ff16610eed5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610849565b565b610ef982826109a6565b61085c57610f0681611058565b610f1183602061106a565b604051602001610f229291906114a2565b60408051601f198184030181529082905262461bcd60e51b825261084991600401611517565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691610fac9190611396565b6000604051808303816000865af19150503d8060008114610fe9576040519150601f19603f3d011682016040523d82523d6000602084013e610fee565b606091505b509150915081801561101857508051158061101857508080602001905181019061101891906113b2565b610d8d5760405162461bcd60e51b815260206004820152601160248201527021736166655472616e7366657246726f6d60781b6044820152606401610849565b60606103536001600160a01b03831660145b606060006110798360026112f5565b6110849060026112dd565b67ffffffffffffffff81111561109c5761109c6113d4565b6040519080825280601f01601f1916602001820160405280156110c6576020820181803683370190505b509050600360fc1b816000815181106110e1576110e16113ea565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611110576111106113ea565b60200101906001600160f81b031916908160001a90535060006111348460026112f5565b61113f9060016112dd565b90505b60018111156111b7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611173576111736113ea565b1a60f81b828281518110611189576111896113ea565b60200101906001600160f81b031916908160001a90535060049490941c936111b08161154a565b9050611142565b508315610aa35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610849565b60006020828403121561121857600080fd5b81356001600160e01b031981168114610aa357600080fd5b600080600083850361010081121561124757600080fd5b843593506020850135925060c0603f198201121561126457600080fd5b506040840190509250925092565b60006020828403121561128457600080fd5b5035919050565b6000806040838503121561129e57600080fd5b8235915060208301356001600160a01b03811681146112bc57600080fd5b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082198211156112f0576112f06112c7565b500190565b600081600019048311821515161561130f5761130f6112c7565b500290565b60008261133157634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611348576113486112c7565b500390565b60006020828403121561135f57600080fd5b5051919050565b60005b83811015611381578181015183820152602001611369565b83811115611390576000848401525b50505050565b600082516113a8818460208701611366565b9190910192915050565b6000602082840312156113c457600080fd5b81518015158114610aa357600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060a0820187835260208781850152604060a08186015282885180855260c087019150838a01945060005b8181101561147657855180516001600160a01b039081168552868201518116878601528582015115158686015260609182015116908401529484019460809092019160010161142c565b50506001600160a01b0388166060870152935061149292505050565b8260808301529695505050505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516114da816017850160208801611366565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161150b816028840160208801611366565b01602801949350505050565b6020815260008251806020840152611536816040850160208701611366565b601f01601f19169190910160400192915050565b600081611559576115596112c7565b50600019019056fea264697066735822122037119e7b72d1abb0d63bd337013d9451209f9e9c7e903b61edd2c2fb97fa42da64736f6c634300080a0033", + "numDeployments": 3, + "solcInputHash": "022f3ce40275a8e97dd7aed1a32a6b1c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MANAGER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"usdcAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"aeroAmount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"sMerkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"uMerkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"sSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"uSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawUnlockTime\",\"type\":\"uint256\"}],\"internalType\":\"struct OpPoolState\",\"name\":\"state\",\"type\":\"tuple\"}],\"name\":\"addRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aero\",\"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\":\"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\":\"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\":\"router\",\"outputs\":[{\"internalType\":\"contract IRouter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sAeroDistributor\",\"outputs\":[{\"internalType\":\"contract ISonneMerkleDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sSonneDistributor\",\"outputs\":[{\"internalType\":\"contract ISonneMerkleDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"setDelegator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sonne\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uAeroDistributor\",\"outputs\":[{\"internalType\":\"contract ISonneMerkleDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uUsdcDistributor\",\"outputs\":[{\"internalType\":\"contract ISonneMerkleDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"usdbc\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"usdc\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/BaseRewardManager.sol\":\"BaseRewardManager\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/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/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\"},\"contracts/BaseRewardManager.sol\":{\"content\":\"//SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.10;\\n\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\n\\nimport './interfaces/AerodromeInterfaces.sol';\\nimport './interfaces/SonneMerkleDistributorInterfaces.sol';\\nimport './libraries/SafeToken.sol';\\n\\nstruct OpPoolState {\\n bytes32 sMerkleRoot;\\n bytes32 uMerkleRoot;\\n uint256 sSupply;\\n uint256 uSupply;\\n uint256 blockNumber;\\n uint256 withdrawUnlockTime;\\n}\\n\\ncontract BaseRewardManager is AccessControlUpgradeable {\\n using SafeToken for address;\\n\\n bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE');\\n\\n ISonneMerkleDistributor public constant sSonneDistributor =\\n ISonneMerkleDistributor(0x071B00ef6AD31Fb716955a1d70Ab26D47290120a);\\n ISonneMerkleDistributor public constant uUsdcDistributor =\\n ISonneMerkleDistributor(0x6cbDABf17c4634fA4F9A0C4A5e73Fd869F9a9be8);\\n ISonneMerkleDistributor public constant sAeroDistributor =\\n ISonneMerkleDistributor(0xA1918c958963DC7E710F5736A7fbCa7C32Bf501d);\\n ISonneMerkleDistributor public constant uAeroDistributor =\\n ISonneMerkleDistributor(0xcA31a8173AB19c3fa006D0Adc2883882F189797b);\\n\\n address public constant sonne = 0x22a2488fE295047Ba13BD8cCCdBC8361DBD8cf7c;\\n address public constant usdc = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913;\\n address public constant usdbc = 0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA;\\n address public constant aero = 0x940181a94A35A4569E4529A3CDfB74e38FD98631;\\n\\n IRouter public constant router = IRouter(0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43);\\n\\n function initialize() public initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n _grantRole(MANAGER_ROLE, _msgSender());\\n }\\n\\n function addRewards(\\n uint256 usdcAmount,\\n uint256 aeroAmount,\\n OpPoolState calldata state\\n ) public onlyRole(MANAGER_ROLE) {\\n uint256 totalSupply = state.sSupply + state.uSupply;\\n\\n // add velo\\n if (aeroAmount > 0) {\\n pullTokenInternal(aero, aeroAmount);\\n uint256 amount = aero.balanceOf(address(this));\\n\\n uint256 uAmount = (amount * state.uSupply) / totalSupply;\\n uint256 sAmount = amount - uAmount;\\n\\n // add for uSonne\\n aero.safeApprove(address(uAeroDistributor), uAmount);\\n uAeroDistributor.addReward(\\n uAmount,\\n state.uMerkleRoot,\\n state.blockNumber,\\n state.withdrawUnlockTime,\\n state.uSupply\\n );\\n\\n // add for sSonne\\n aero.safeApprove(address(sAeroDistributor), sAmount);\\n sAeroDistributor.addReward(\\n sAmount,\\n state.sMerkleRoot,\\n state.blockNumber,\\n state.withdrawUnlockTime,\\n state.sSupply\\n );\\n }\\n\\n // add usdc\\n if (usdcAmount > 0) {\\n pullTokenInternal(usdc, usdcAmount);\\n uint256 amount = usdc.balanceOf(address(this));\\n\\n uint256 uUSDCAmount = (amount * state.uSupply) / totalSupply;\\n uint256 sUSDCAmount = amount - uUSDCAmount;\\n\\n // add usdc for uSonne\\n usdc.safeApprove(address(uUsdcDistributor), uUSDCAmount);\\n uUsdcDistributor.addReward(\\n uUSDCAmount,\\n state.uMerkleRoot,\\n state.blockNumber,\\n state.withdrawUnlockTime,\\n state.uSupply\\n );\\n\\n // swap usdc to sonne\\n swapUSDCtoSonneInternal(sUSDCAmount);\\n\\n // add sonne for sSonne\\n uint256 sonneAmount = sonne.balanceOf(address(this));\\n sonne.safeApprove(address(sSonneDistributor), sonneAmount);\\n sSonneDistributor.addReward(\\n sonneAmount,\\n state.sMerkleRoot,\\n state.blockNumber,\\n state.withdrawUnlockTime,\\n state.sSupply\\n );\\n }\\n }\\n\\n function setDelegator(address recipient, address delegator) public onlyRole(MANAGER_ROLE) {\\n sSonneDistributor.setDelegator(recipient, delegator);\\n uUsdcDistributor.setDelegator(recipient, delegator);\\n sAeroDistributor.setDelegator(recipient, delegator);\\n uAeroDistributor.setDelegator(recipient, delegator);\\n }\\n\\n function pullTokenInternal(address token, uint256 amount) internal {\\n if (amount == type(uint256).max) {\\n amount = token.balanceOf(msg.sender);\\n }\\n\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n function swapUSDCtoSonneInternal(uint256 usdcAmount) internal {\\n IRouter.Route[] memory path = new IRouter.Route[](2);\\n path[0] = IRouter.Route({from: usdc, to: usdbc, stable: true, factory: address(0)});\\n path[1] = IRouter.Route({from: usdbc, to: sonne, stable: false, factory: address(0)});\\n\\n usdc.safeApprove(address(router), usdcAmount);\\n router.swapExactTokensForTokens(usdcAmount, 0, path, address(this), block.timestamp);\\n }\\n}\\n\",\"keccak256\":\"0x483a77d67815b3749439fa9db9311a138d3d862f60c3fb41405f2d79f9883dbf\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/AerodromeInterfaces.sol\":{\"content\":\"//SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.10;\\n\\ninterface IRouter {\\n struct Route {\\n address from;\\n address to;\\n bool stable;\\n address factory;\\n }\\n\\n function swapExactTokensForTokens(\\n uint amountIn,\\n uint amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint deadline\\n ) external;\\n}\\n\\ninterface IVoter {\\n function gauges(address pair) external view returns (address gauge);\\n}\\n\\ninterface IGauge {\\n function stake() external view returns (address token);\\n\\n function balanceOf(address account) external view returns (uint256 amount);\\n\\n function deposit(uint256 amount, uint256 tokenId) external;\\n\\n function depositAll(uint256 tokenId) external;\\n\\n function withdrawAll() external;\\n\\n function withdraw(uint256 amount) external;\\n\\n function getReward(address account, address[] memory tokens) external;\\n}\\n\",\"keccak256\":\"0xbf9efda43a7beeea8835ac2ad4c4e32a8334f0813f92461a62feb602732afa28\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/SonneMerkleDistributorInterfaces.sol\":{\"content\":\"//SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.10;\\n\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface ISonneMerkleDistributor {\\n event NewMerkle(\\n address indexed creator,\\n address indexed rewardToken,\\n uint256 amount,\\n bytes32 indexed merkleRoot,\\n uint256 blockNr,\\n uint256 withdrawUnlockTime\\n );\\n\\n function rewardToken() external view returns (IERC20);\\n\\n function Rewards(\\n uint256 blockNumber\\n ) external view returns (uint256 balance, bytes32 merkleRoot, uint256 withdrawUnlockTime, uint256 ratio);\\n\\n function addReward(\\n uint256 amount,\\n bytes32 merkleRoot,\\n uint256 blockNumber,\\n uint256 withdrawUnlockTime,\\n uint256 totalStakedBalance\\n ) external;\\n\\n function setDelegator(address _recipient, address _delegator) external;\\n\\n // For testing\\n\\n function grantRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x435afc4b376e474ca906f1e6a629ba824f62dde4100b299dc81e97aaebfa8599\",\"license\":\"UNLICENSED\"},\"contracts/libraries/SafeToken.sol\":{\"content\":\"//SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.10;\\n\\ninterface ERC20Interface {\\n function balanceOf(address user) external view returns (uint256);\\n}\\n\\nlibrary SafeToken {\\n function myBalance(address token) internal view returns (uint256) {\\n return ERC20Interface(token).balanceOf(address(this));\\n }\\n\\n function balanceOf(address token, address user) internal view returns (uint256) {\\n return ERC20Interface(token).balanceOf(user);\\n }\\n\\n function safeApprove(\\n address token,\\n address to,\\n uint256 value\\n ) internal {\\n // bytes4(keccak256(bytes('approve(address,uint256)')));\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeApprove');\\n }\\n\\n function safeTransfer(\\n address token,\\n address to,\\n uint256 value\\n ) internal {\\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeTransfer');\\n }\\n\\n function safeTransferFrom(\\n address token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeTransferFrom');\\n }\\n\\n function safeTransferETH(address to, uint256 value) internal {\\n (bool success, ) = to.call{value: value}(new bytes(0));\\n require(success, '!safeTransferETH');\\n }\\n}\\n\",\"keccak256\":\"0x1468e397846220330a392e7cacaf9a7863cb4c26ec87b1883cb1c7a962b21a77\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506117c6806100206000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638129fc1c116100ad578063c0c2ae5011610071578063c0c2ae50146102b5578063ca45283b146102d0578063d547741f146102eb578063ec87621c146102fe578063f887ea401461031357600080fd5b80638129fc1c1461025c57806386f0abde1461026457806391d148541461027f5780639bbb348914610292578063a217fddf146102ad57600080fd5b806326837eda116100f457806326837eda146101e55780632f2ff15d1461020057806336568abe146102135780633e413bee146102265780634648e89a1461024157600080fd5b806301ffc9a7146101315780630bc798d2146101595780630e1d68251461018c5780631ce92be5146101a1578063248a9ca3146101b4575b600080fd5b61014461013f3660046113df565b61032e565b60405190151581526020015b60405180910390f35b61017473d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca81565b6040516001600160a01b039091168152602001610150565b61019f61019a366004611409565b610365565b005b61019f6101af366004611467565b6107ad565b6101d76101c236600461149a565b60009081526065602052604090206001015490565b604051908152602001610150565b61017473940181a94a35a4569e4529a3cdfb74e38fd9863181565b61019f61020e3660046114b3565b61099e565b61019f6102213660046114b3565b6109c8565b61017473833589fcd6edb6e08f4c7c32d4f71b54bda0291381565b61017473a1918c958963dc7e710f5736a7fbca7c32bf501d81565b61019f610a4b565b610174736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be881565b61014461028d3660046114b3565b610b7f565b61017473071b00ef6ad31fb716955a1d70ab26d47290120a81565b6101d7600081565b6101747322a2488fe295047ba13bd8cccdbc8361dbd8cf7c81565b61017473ca31a8173ab19c3fa006d0adc2883882f189797b81565b61019f6102f93660046114b3565b610baa565b6101d760008051602061177183398151915281565b61017473cf77a3ba9a5ca399b7c97c74d54e5b1beb874e4381565b60006001600160e01b03198216637965db0b60e01b148061035f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061177183398151915261037d81610bcf565b6000610391606084013560408501356114ec565b90508315610588576103b773940181a94a35a4569e4529a3cdfb74e38fd9863185610bd9565b60006103d773940181a94a35a4569e4529a3cdfb74e38fd9863130610c0e565b90506000826103ea606087013584611504565b6103f49190611523565b905060006104028284611545565b905061043773940181a94a35a4569e4529a3cdfb74e38fd9863173ca31a8173ab19c3fa006d0adc2883882f189797b84610c83565b6040516324d9914b60e21b815260048101839052602087013560248201526080870135604482015260a087013560648201526060870135608482015273ca31a8173ab19c3fa006d0adc2883882f189797b90639366452c9060a401600060405180830381600087803b1580156104ac57600080fd5b505af11580156104c0573d6000803e3d6000fd5b506104fa925073940181a94a35a4569e4529a3cdfb74e38fd98631915073a1918c958963dc7e710f5736a7fbca7c32bf501d905083610c83565b604080516324d9914b60e21b815260048101839052873560248201526080880135604482015260a0880135606482015290870135608482015273a1918c958963dc7e710f5736a7fbca7c32bf501d90639366452c9060a401600060405180830381600087803b15801561056c57600080fd5b505af1158015610580573d6000803e3d6000fd5b505050505050505b84156107a6576105ac73833589fcd6edb6e08f4c7c32d4f71b54bda0291386610bd9565b60006105cc73833589fcd6edb6e08f4c7c32d4f71b54bda0291330610c0e565b90506000826105df606087013584611504565b6105e99190611523565b905060006105f78284611545565b905061062c73833589fcd6edb6e08f4c7c32d4f71b54bda02913736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be884610c83565b6040516324d9914b60e21b815260048101839052602087013560248201526080870135604482015260a0870135606482015260608701356084820152736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be890639366452c9060a401600060405180830381600087803b1580156106a157600080fd5b505af11580156106b5573d6000803e3d6000fd5b505050506106c281610d86565b60006106e27322a2488fe295047ba13bd8cccdbc8361dbd8cf7c30610c0e565b90506107177322a2488fe295047ba13bd8cccdbc8361dbd8cf7c73071b00ef6ad31fb716955a1d70ab26d47290120a83610c83565b604080516324d9914b60e21b815260048101839052883560248201526080890135604482015260a0890135606482015290880135608482015273071b00ef6ad31fb716955a1d70ab26d47290120a90639366452c9060a401600060405180830381600087803b15801561078957600080fd5b505af115801561079d573d6000803e3d6000fd5b50505050505050505b5050505050565b6000805160206117718339815191526107c581610bcf565b604051631ce92be560e01b81526001600160a01b0380851660048301528316602482015273071b00ef6ad31fb716955a1d70ab26d47290120a90631ce92be590604401600060405180830381600087803b15801561082257600080fd5b505af1158015610836573d6000803e3d6000fd5b5050604051631ce92be560e01b81526001600160a01b03808716600483015285166024820152736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be89250631ce92be59150604401600060405180830381600087803b15801561089757600080fd5b505af11580156108ab573d6000803e3d6000fd5b5050604051631ce92be560e01b81526001600160a01b0380871660048301528516602482015273a1918c958963dc7e710f5736a7fbca7c32bf501d9250631ce92be59150604401600060405180830381600087803b15801561090c57600080fd5b505af1158015610920573d6000803e3d6000fd5b5050604051631ce92be560e01b81526001600160a01b0380871660048301528516602482015273ca31a8173ab19c3fa006d0adc2883882f189797b9250631ce92be59150604401600060405180830381600087803b15801561098157600080fd5b505af1158015610995573d6000803e3d6000fd5b50505050505050565b6000828152606560205260409020600101546109b981610bcf565b6109c38383610f6e565b505050565b6001600160a01b0381163314610a3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610a478282610ff4565b5050565b600054610100900460ff1615808015610a6b5750600054600160ff909116105b80610a855750303b158015610a85575060005460ff166001145b610ae85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a34565b6000805460ff191660011790558015610b0b576000805461ff0019166101001790555b610b1361105b565b610b1e600033610f6e565b610b3660008051602061177183398151915233610f6e565b8015610b7c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600082815260656020526040902060010154610bc581610bcf565b6109c38383610ff4565b610b7c81336110c8565b600019811415610bf957610bf66001600160a01b03831633610c0e565b90505b610a476001600160a01b038316333084611121565b6040516370a0823160e01b81526001600160a01b038281166004830152600091908416906370a0823190602401602060405180830381865afa158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c919061155c565b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839290871691610cdf91906115a5565b6000604051808303816000865af19150503d8060008114610d1c576040519150601f19603f3d011682016040523d82523d6000602084013e610d21565b606091505b5091509150818015610d4b575080511580610d4b575080806020019051810190610d4b91906115c1565b6107a65760405162461bcd60e51b815260206004820152600c60248201526b2173616665417070726f766560a01b6044820152606401610a34565b60408051600280825260608201909252600091816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610d9e5750506040805160808101825273833589fcd6edb6e08f4c7c32d4f71b54bda02913815273d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca602082015260019181019190915260006060820181905282519293509091839190610e3457610e346115f9565b6020026020010181905250604051806080016040528073d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca6001600160a01b031681526020017322a2488fe295047ba13bd8cccdbc8361dbd8cf7c6001600160a01b0316815260200160001515815260200160006001600160a01b031681525081600181518110610eba57610eba6115f9565b6020908102919091010152610ef873833589fcd6edb6e08f4c7c32d4f71b54bda0291373cf77a3ba9a5ca399b7c97c74d54e5b1beb874e4384610c83565b60405163cac88ea960e01b815273cf77a3ba9a5ca399b7c97c74d54e5b1beb874e439063cac88ea990610f3890859060009086903090429060040161160f565b600060405180830381600087803b158015610f5257600080fd5b505af1158015610f66573d6000803e3d6000fd5b505050505050565b610f788282610b7f565b610a475760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610fb03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610ffe8282610b7f565b15610a475760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600054610100900460ff166110c65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610a34565b565b6110d28282610b7f565b610a47576110df81611231565b6110ea836020611243565b6040516020016110fb9291906116b1565b60408051601f198184030181529082905262461bcd60e51b8252610a3491600401611726565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161118591906115a5565b6000604051808303816000865af19150503d80600081146111c2576040519150601f19603f3d011682016040523d82523d6000602084013e6111c7565b606091505b50915091508180156111f15750805115806111f15750808060200190518101906111f191906115c1565b610f665760405162461bcd60e51b815260206004820152601160248201527021736166655472616e7366657246726f6d60781b6044820152606401610a34565b606061035f6001600160a01b03831660145b60606000611252836002611504565b61125d9060026114ec565b67ffffffffffffffff811115611275576112756115e3565b6040519080825280601f01601f19166020018201604052801561129f576020820181803683370190505b509050600360fc1b816000815181106112ba576112ba6115f9565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112e9576112e96115f9565b60200101906001600160f81b031916908160001a905350600061130d846002611504565b6113189060016114ec565b90505b6001811115611390576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061134c5761134c6115f9565b1a60f81b828281518110611362576113626115f9565b60200101906001600160f81b031916908160001a90535060049490941c9361138981611759565b905061131b565b508315610c7c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a34565b6000602082840312156113f157600080fd5b81356001600160e01b031981168114610c7c57600080fd5b600080600083850361010081121561142057600080fd5b843593506020850135925060c0603f198201121561143d57600080fd5b506040840190509250925092565b80356001600160a01b038116811461146257600080fd5b919050565b6000806040838503121561147a57600080fd5b6114838361144b565b91506114916020840161144b565b90509250929050565b6000602082840312156114ac57600080fd5b5035919050565b600080604083850312156114c657600080fd5b823591506114916020840161144b565b634e487b7160e01b600052601160045260246000fd5b600082198211156114ff576114ff6114d6565b500190565b600081600019048311821515161561151e5761151e6114d6565b500290565b60008261154057634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611557576115576114d6565b500390565b60006020828403121561156e57600080fd5b5051919050565b60005b83811015611590578181015183820152602001611578565b8381111561159f576000848401525b50505050565b600082516115b7818460208701611575565b9190910192915050565b6000602082840312156115d357600080fd5b81518015158114610c7c57600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060a0820187835260208781850152604060a08186015282885180855260c087019150838a01945060005b8181101561168557855180516001600160a01b039081168552868201518116878601528582015115158686015260609182015116908401529484019460809092019160010161163b565b50506001600160a01b038816606087015293506116a192505050565b8260808301529695505050505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516116e9816017850160208801611575565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161171a816028840160208801611575565b01602801949350505050565b6020815260008251806020840152611745816040850160208701611575565b601f01601f19169190910160400192915050565b600081611768576117686114d6565b50600019019056fe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08a26469706673582212204a0bb5359282ae4e228cca6b3326aead88e9543089d5a732fa101fa619c4626264736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80638129fc1c116100ad578063c0c2ae5011610071578063c0c2ae50146102b5578063ca45283b146102d0578063d547741f146102eb578063ec87621c146102fe578063f887ea401461031357600080fd5b80638129fc1c1461025c57806386f0abde1461026457806391d148541461027f5780639bbb348914610292578063a217fddf146102ad57600080fd5b806326837eda116100f457806326837eda146101e55780632f2ff15d1461020057806336568abe146102135780633e413bee146102265780634648e89a1461024157600080fd5b806301ffc9a7146101315780630bc798d2146101595780630e1d68251461018c5780631ce92be5146101a1578063248a9ca3146101b4575b600080fd5b61014461013f3660046113df565b61032e565b60405190151581526020015b60405180910390f35b61017473d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca81565b6040516001600160a01b039091168152602001610150565b61019f61019a366004611409565b610365565b005b61019f6101af366004611467565b6107ad565b6101d76101c236600461149a565b60009081526065602052604090206001015490565b604051908152602001610150565b61017473940181a94a35a4569e4529a3cdfb74e38fd9863181565b61019f61020e3660046114b3565b61099e565b61019f6102213660046114b3565b6109c8565b61017473833589fcd6edb6e08f4c7c32d4f71b54bda0291381565b61017473a1918c958963dc7e710f5736a7fbca7c32bf501d81565b61019f610a4b565b610174736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be881565b61014461028d3660046114b3565b610b7f565b61017473071b00ef6ad31fb716955a1d70ab26d47290120a81565b6101d7600081565b6101747322a2488fe295047ba13bd8cccdbc8361dbd8cf7c81565b61017473ca31a8173ab19c3fa006d0adc2883882f189797b81565b61019f6102f93660046114b3565b610baa565b6101d760008051602061177183398151915281565b61017473cf77a3ba9a5ca399b7c97c74d54e5b1beb874e4381565b60006001600160e01b03198216637965db0b60e01b148061035f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061177183398151915261037d81610bcf565b6000610391606084013560408501356114ec565b90508315610588576103b773940181a94a35a4569e4529a3cdfb74e38fd9863185610bd9565b60006103d773940181a94a35a4569e4529a3cdfb74e38fd9863130610c0e565b90506000826103ea606087013584611504565b6103f49190611523565b905060006104028284611545565b905061043773940181a94a35a4569e4529a3cdfb74e38fd9863173ca31a8173ab19c3fa006d0adc2883882f189797b84610c83565b6040516324d9914b60e21b815260048101839052602087013560248201526080870135604482015260a087013560648201526060870135608482015273ca31a8173ab19c3fa006d0adc2883882f189797b90639366452c9060a401600060405180830381600087803b1580156104ac57600080fd5b505af11580156104c0573d6000803e3d6000fd5b506104fa925073940181a94a35a4569e4529a3cdfb74e38fd98631915073a1918c958963dc7e710f5736a7fbca7c32bf501d905083610c83565b604080516324d9914b60e21b815260048101839052873560248201526080880135604482015260a0880135606482015290870135608482015273a1918c958963dc7e710f5736a7fbca7c32bf501d90639366452c9060a401600060405180830381600087803b15801561056c57600080fd5b505af1158015610580573d6000803e3d6000fd5b505050505050505b84156107a6576105ac73833589fcd6edb6e08f4c7c32d4f71b54bda0291386610bd9565b60006105cc73833589fcd6edb6e08f4c7c32d4f71b54bda0291330610c0e565b90506000826105df606087013584611504565b6105e99190611523565b905060006105f78284611545565b905061062c73833589fcd6edb6e08f4c7c32d4f71b54bda02913736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be884610c83565b6040516324d9914b60e21b815260048101839052602087013560248201526080870135604482015260a0870135606482015260608701356084820152736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be890639366452c9060a401600060405180830381600087803b1580156106a157600080fd5b505af11580156106b5573d6000803e3d6000fd5b505050506106c281610d86565b60006106e27322a2488fe295047ba13bd8cccdbc8361dbd8cf7c30610c0e565b90506107177322a2488fe295047ba13bd8cccdbc8361dbd8cf7c73071b00ef6ad31fb716955a1d70ab26d47290120a83610c83565b604080516324d9914b60e21b815260048101839052883560248201526080890135604482015260a0890135606482015290880135608482015273071b00ef6ad31fb716955a1d70ab26d47290120a90639366452c9060a401600060405180830381600087803b15801561078957600080fd5b505af115801561079d573d6000803e3d6000fd5b50505050505050505b5050505050565b6000805160206117718339815191526107c581610bcf565b604051631ce92be560e01b81526001600160a01b0380851660048301528316602482015273071b00ef6ad31fb716955a1d70ab26d47290120a90631ce92be590604401600060405180830381600087803b15801561082257600080fd5b505af1158015610836573d6000803e3d6000fd5b5050604051631ce92be560e01b81526001600160a01b03808716600483015285166024820152736cbdabf17c4634fa4f9a0c4a5e73fd869f9a9be89250631ce92be59150604401600060405180830381600087803b15801561089757600080fd5b505af11580156108ab573d6000803e3d6000fd5b5050604051631ce92be560e01b81526001600160a01b0380871660048301528516602482015273a1918c958963dc7e710f5736a7fbca7c32bf501d9250631ce92be59150604401600060405180830381600087803b15801561090c57600080fd5b505af1158015610920573d6000803e3d6000fd5b5050604051631ce92be560e01b81526001600160a01b0380871660048301528516602482015273ca31a8173ab19c3fa006d0adc2883882f189797b9250631ce92be59150604401600060405180830381600087803b15801561098157600080fd5b505af1158015610995573d6000803e3d6000fd5b50505050505050565b6000828152606560205260409020600101546109b981610bcf565b6109c38383610f6e565b505050565b6001600160a01b0381163314610a3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610a478282610ff4565b5050565b600054610100900460ff1615808015610a6b5750600054600160ff909116105b80610a855750303b158015610a85575060005460ff166001145b610ae85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a34565b6000805460ff191660011790558015610b0b576000805461ff0019166101001790555b610b1361105b565b610b1e600033610f6e565b610b3660008051602061177183398151915233610f6e565b8015610b7c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600082815260656020526040902060010154610bc581610bcf565b6109c38383610ff4565b610b7c81336110c8565b600019811415610bf957610bf66001600160a01b03831633610c0e565b90505b610a476001600160a01b038316333084611121565b6040516370a0823160e01b81526001600160a01b038281166004830152600091908416906370a0823190602401602060405180830381865afa158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c919061155c565b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839290871691610cdf91906115a5565b6000604051808303816000865af19150503d8060008114610d1c576040519150601f19603f3d011682016040523d82523d6000602084013e610d21565b606091505b5091509150818015610d4b575080511580610d4b575080806020019051810190610d4b91906115c1565b6107a65760405162461bcd60e51b815260206004820152600c60248201526b2173616665417070726f766560a01b6044820152606401610a34565b60408051600280825260608201909252600091816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610d9e5750506040805160808101825273833589fcd6edb6e08f4c7c32d4f71b54bda02913815273d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca602082015260019181019190915260006060820181905282519293509091839190610e3457610e346115f9565b6020026020010181905250604051806080016040528073d9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca6001600160a01b031681526020017322a2488fe295047ba13bd8cccdbc8361dbd8cf7c6001600160a01b0316815260200160001515815260200160006001600160a01b031681525081600181518110610eba57610eba6115f9565b6020908102919091010152610ef873833589fcd6edb6e08f4c7c32d4f71b54bda0291373cf77a3ba9a5ca399b7c97c74d54e5b1beb874e4384610c83565b60405163cac88ea960e01b815273cf77a3ba9a5ca399b7c97c74d54e5b1beb874e439063cac88ea990610f3890859060009086903090429060040161160f565b600060405180830381600087803b158015610f5257600080fd5b505af1158015610f66573d6000803e3d6000fd5b505050505050565b610f788282610b7f565b610a475760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610fb03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610ffe8282610b7f565b15610a475760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600054610100900460ff166110c65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610a34565b565b6110d28282610b7f565b610a47576110df81611231565b6110ea836020611243565b6040516020016110fb9291906116b1565b60408051601f198184030181529082905262461bcd60e51b8252610a3491600401611726565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161118591906115a5565b6000604051808303816000865af19150503d80600081146111c2576040519150601f19603f3d011682016040523d82523d6000602084013e6111c7565b606091505b50915091508180156111f15750805115806111f15750808060200190518101906111f191906115c1565b610f665760405162461bcd60e51b815260206004820152601160248201527021736166655472616e7366657246726f6d60781b6044820152606401610a34565b606061035f6001600160a01b03831660145b60606000611252836002611504565b61125d9060026114ec565b67ffffffffffffffff811115611275576112756115e3565b6040519080825280601f01601f19166020018201604052801561129f576020820181803683370190505b509050600360fc1b816000815181106112ba576112ba6115f9565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112e9576112e96115f9565b60200101906001600160f81b031916908160001a905350600061130d846002611504565b6113189060016114ec565b90505b6001811115611390576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061134c5761134c6115f9565b1a60f81b828281518110611362576113626115f9565b60200101906001600160f81b031916908160001a90535060049490941c9361138981611759565b905061131b565b508315610c7c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a34565b6000602082840312156113f157600080fd5b81356001600160e01b031981168114610c7c57600080fd5b600080600083850361010081121561142057600080fd5b843593506020850135925060c0603f198201121561143d57600080fd5b506040840190509250925092565b80356001600160a01b038116811461146257600080fd5b919050565b6000806040838503121561147a57600080fd5b6114838361144b565b91506114916020840161144b565b90509250929050565b6000602082840312156114ac57600080fd5b5035919050565b600080604083850312156114c657600080fd5b823591506114916020840161144b565b634e487b7160e01b600052601160045260246000fd5b600082198211156114ff576114ff6114d6565b500190565b600081600019048311821515161561151e5761151e6114d6565b500290565b60008261154057634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611557576115576114d6565b500390565b60006020828403121561156e57600080fd5b5051919050565b60005b83811015611590578181015183820152602001611578565b8381111561159f576000848401525b50505050565b600082516115b7818460208701611575565b9190910192915050565b6000602082840312156115d357600080fd5b81518015158114610c7c57600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060a0820187835260208781850152604060a08186015282885180855260c087019150838a01945060005b8181101561168557855180516001600160a01b039081168552868201518116878601528582015115158686015260609182015116908401529484019460809092019160010161163b565b50506001600160a01b038816606087015293506116a192505050565b8260808301529695505050505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516116e9816017850160208801611575565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161171a816028840160208801611575565b01602801949350505050565b6020815260008251806020840152611745816040850160208701611575565b601f01601f19169190910160400192915050565b600081611768576117686114d6565b50600019019056fe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08a26469706673582212204a0bb5359282ae4e228cca6b3326aead88e9543089d5a732fa101fa619c4626264736f6c634300080a0033", "devdoc": { "kind": "dev", "methods": { @@ -465,7 +483,7 @@ "storageLayout": { "storage": [ { - "astId": 547, + "astId": 415, "contract": "contracts/BaseRewardManager.sol:BaseRewardManager", "label": "_initialized", "offset": 0, @@ -473,7 +491,7 @@ "type": "t_uint8" }, { - "astId": 550, + "astId": 418, "contract": "contracts/BaseRewardManager.sol:BaseRewardManager", "label": "_initializing", "offset": 1, @@ -481,7 +499,7 @@ "type": "t_bool" }, { - "astId": 1080, + "astId": 948, "contract": "contracts/BaseRewardManager.sol:BaseRewardManager", "label": "__gap", "offset": 0, @@ -489,7 +507,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 1353, + "astId": 1221, "contract": "contracts/BaseRewardManager.sol:BaseRewardManager", "label": "__gap", "offset": 0, diff --git a/deployments/base/solcInputs/022f3ce40275a8e97dd7aed1a32a6b1c.json b/deployments/base/solcInputs/022f3ce40275a8e97dd7aed1a32a6b1c.json new file mode 100644 index 0000000..05cd35f --- /dev/null +++ b/deployments/base/solcInputs/022f3ce40275a8e97dd7aed1a32a6b1c.json @@ -0,0 +1,83 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal onlyInitializing {\n }\n\n function __AccessControl_init_unchained() internal onlyInitializing {\n }\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(account),\n \" is missing role \",\n StringsUpgradeable.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal onlyInitializing {\n }\n\n function __ERC165_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMathUpgradeable {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\nimport \"./math/SignedMathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = MathUpgradeable.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMathUpgradeable.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, MathUpgradeable.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@openzeppelin/contracts/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" + }, + "contracts/BaseReserveManager.sol": { + "content": "//SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.10;\n\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\n\nimport './interfaces/LendingInterfaces.sol';\nimport './interfaces/AerodromeInterfaces.sol';\nimport './libraries/SafeToken.sol';\n\nimport './BaseRewardManager.sol';\n\ncontract BaseReserveManager is AccessControlUpgradeable {\n using SafeToken for address;\n\n bytes32 public constant DISTRIBUTOR_ROLE = keccak256('DISTRIBUTOR_ROLE');\n\n /* Tokens */\n\n address public constant usdc = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913;\n address public constant aero = 0x940181a94A35A4569E4529A3CDfB74e38FD98631;\n\n /* OpenOcean */\n address public constant OORouter = 0x6352a56caadC4F1E25CD6c75970Fa768A3304e64;\n\n /* Aerodrome */\n address public constant voter = 0x16613524e02ad97eDfeF371bC883F2F5d6C480A5;\n\n /* Distribution */\n address public constant rewardManager = 0xC5ba10B609E8500c04884e1bcfc935B2c22654cd;\n address public constant sonneTimelock = 0x5b22BD2fC485afe2DEAf1Ac9e2fAd316dDE163B0;\n\n function initialize() public initializer {\n __AccessControl_init();\n\n _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());\n }\n\n /* Guarded Distribution Functions */\n function distributeReserves(\n IMarket usdcMarket,\n uint56 usdcAmount,\n IMarket[] calldata markets,\n uint256[] calldata amounts,\n bytes[] calldata swapQuoteData,\n OpPoolState calldata state\n ) external onlyRole(DISTRIBUTOR_ROLE) {\n require(\n markets.length == amounts.length && markets.length == swapQuoteData.length,\n 'ReserveManager: INVALID_INPUT'\n );\n\n reduceReserveInternal(usdcMarket, usdcAmount);\n\n for (uint256 i = 0; i < markets.length; i++) {\n reduceReserveInternal(markets[i], amounts[i]);\n address underlying = markets[i].underlying();\n swapToBaseInternal(underlying, amounts[i], swapQuoteData[i]);\n }\n\n uint256 distAmount = usdc.myBalance();\n\n usdc.safeApprove(rewardManager, distAmount);\n BaseRewardManager(rewardManager).addRewards(distAmount, 0, state);\n }\n\n function distributeAero(address pair, OpPoolState calldata state) external onlyRole(DISTRIBUTOR_ROLE) {\n claimAeroInternal(pair);\n\n uint256 distAmount = aero.myBalance();\n\n aero.safeApprove(rewardManager, distAmount);\n BaseRewardManager(rewardManager).addRewards(0, distAmount, state);\n }\n\n /* Guarded Aerodrome Management Function */\n function _stakeLP(address pair, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n if (amount == type(uint256).max) {\n amount = pair.balanceOf(msg.sender);\n }\n\n pair.safeTransferFrom(msg.sender, address(this), amount);\n\n stakeLPInternal(pair);\n }\n\n function _unstakeLP(address pair, address to) public onlyRole(DEFAULT_ADMIN_ROLE) {\n unstakeLPInternal(pair);\n\n uint256 amount = pair.myBalance();\n pair.safeTransfer(to, amount);\n }\n\n /* Internal Market Management Functions */\n function reduceReserveInternal(IMarket market, uint256 amount) internal {\n market.accrueInterest();\n\n require(market.getCash() >= amount, 'ReserveManager: NOT_ENOUGH_CASH');\n require(market.totalReserves() >= amount, 'ReserveManager: NOT_ENOUGH_RESERVE');\n\n ISonneTimelock(sonneTimelock)._reduceReserves(address(market), amount, address(this));\n }\n\n function swapToBaseInternal(address underlying, uint256 amount, bytes memory swapQuoteDatum) internal {\n underlying.safeApprove(OORouter, amount);\n\n (bool success, bytes memory result) = OORouter.call{value: 0}(swapQuoteDatum);\n require(success, 'ReserveManager: OO_API_SWAP_FAILED');\n }\n\n /* Internal Aerodrome Management Functions */\n function stakeLPInternal(address pair) internal {\n address gauge = IVoter(voter).gauges(pair);\n\n uint256 amountPair = pair.myBalance();\n pair.safeApprove(gauge, amountPair);\n IGauge(gauge).deposit(amountPair, 0);\n }\n\n function unstakeLPInternal(address pair) internal {\n address gauge = IVoter(voter).gauges(pair);\n IGauge(gauge).withdrawAll();\n }\n\n function claimAeroInternal(address pair) internal {\n address[] memory tokens = new address[](1);\n tokens[0] = aero;\n\n address gauge = IVoter(voter).gauges(pair);\n IGauge(gauge).getReward(address(this), tokens);\n }\n}\n" + }, + "contracts/BaseRewardManager.sol": { + "content": "//SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.10;\n\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\n\nimport './interfaces/AerodromeInterfaces.sol';\nimport './interfaces/SonneMerkleDistributorInterfaces.sol';\nimport './libraries/SafeToken.sol';\n\nstruct OpPoolState {\n bytes32 sMerkleRoot;\n bytes32 uMerkleRoot;\n uint256 sSupply;\n uint256 uSupply;\n uint256 blockNumber;\n uint256 withdrawUnlockTime;\n}\n\ncontract BaseRewardManager is AccessControlUpgradeable {\n using SafeToken for address;\n\n bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE');\n\n ISonneMerkleDistributor public constant sSonneDistributor =\n ISonneMerkleDistributor(0x071B00ef6AD31Fb716955a1d70Ab26D47290120a);\n ISonneMerkleDistributor public constant uUsdcDistributor =\n ISonneMerkleDistributor(0x6cbDABf17c4634fA4F9A0C4A5e73Fd869F9a9be8);\n ISonneMerkleDistributor public constant sAeroDistributor =\n ISonneMerkleDistributor(0xA1918c958963DC7E710F5736A7fbCa7C32Bf501d);\n ISonneMerkleDistributor public constant uAeroDistributor =\n ISonneMerkleDistributor(0xcA31a8173AB19c3fa006D0Adc2883882F189797b);\n\n address public constant sonne = 0x22a2488fE295047Ba13BD8cCCdBC8361DBD8cf7c;\n address public constant usdc = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913;\n address public constant usdbc = 0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA;\n address public constant aero = 0x940181a94A35A4569E4529A3CDfB74e38FD98631;\n\n IRouter public constant router = IRouter(0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43);\n\n function initialize() public initializer {\n __AccessControl_init();\n\n _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _grantRole(MANAGER_ROLE, _msgSender());\n }\n\n function addRewards(\n uint256 usdcAmount,\n uint256 aeroAmount,\n OpPoolState calldata state\n ) public onlyRole(MANAGER_ROLE) {\n uint256 totalSupply = state.sSupply + state.uSupply;\n\n // add velo\n if (aeroAmount > 0) {\n pullTokenInternal(aero, aeroAmount);\n uint256 amount = aero.balanceOf(address(this));\n\n uint256 uAmount = (amount * state.uSupply) / totalSupply;\n uint256 sAmount = amount - uAmount;\n\n // add for uSonne\n aero.safeApprove(address(uAeroDistributor), uAmount);\n uAeroDistributor.addReward(\n uAmount,\n state.uMerkleRoot,\n state.blockNumber,\n state.withdrawUnlockTime,\n state.uSupply\n );\n\n // add for sSonne\n aero.safeApprove(address(sAeroDistributor), sAmount);\n sAeroDistributor.addReward(\n sAmount,\n state.sMerkleRoot,\n state.blockNumber,\n state.withdrawUnlockTime,\n state.sSupply\n );\n }\n\n // add usdc\n if (usdcAmount > 0) {\n pullTokenInternal(usdc, usdcAmount);\n uint256 amount = usdc.balanceOf(address(this));\n\n uint256 uUSDCAmount = (amount * state.uSupply) / totalSupply;\n uint256 sUSDCAmount = amount - uUSDCAmount;\n\n // add usdc for uSonne\n usdc.safeApprove(address(uUsdcDistributor), uUSDCAmount);\n uUsdcDistributor.addReward(\n uUSDCAmount,\n state.uMerkleRoot,\n state.blockNumber,\n state.withdrawUnlockTime,\n state.uSupply\n );\n\n // swap usdc to sonne\n swapUSDCtoSonneInternal(sUSDCAmount);\n\n // add sonne for sSonne\n uint256 sonneAmount = sonne.balanceOf(address(this));\n sonne.safeApprove(address(sSonneDistributor), sonneAmount);\n sSonneDistributor.addReward(\n sonneAmount,\n state.sMerkleRoot,\n state.blockNumber,\n state.withdrawUnlockTime,\n state.sSupply\n );\n }\n }\n\n function setDelegator(address recipient, address delegator) public onlyRole(MANAGER_ROLE) {\n sSonneDistributor.setDelegator(recipient, delegator);\n uUsdcDistributor.setDelegator(recipient, delegator);\n sAeroDistributor.setDelegator(recipient, delegator);\n uAeroDistributor.setDelegator(recipient, delegator);\n }\n\n function pullTokenInternal(address token, uint256 amount) internal {\n if (amount == type(uint256).max) {\n amount = token.balanceOf(msg.sender);\n }\n\n token.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function swapUSDCtoSonneInternal(uint256 usdcAmount) internal {\n IRouter.Route[] memory path = new IRouter.Route[](2);\n path[0] = IRouter.Route({from: usdc, to: usdbc, stable: true, factory: address(0)});\n path[1] = IRouter.Route({from: usdbc, to: sonne, stable: false, factory: address(0)});\n\n usdc.safeApprove(address(router), usdcAmount);\n router.swapExactTokensForTokens(usdcAmount, 0, path, address(this), block.timestamp);\n }\n}\n" + }, + "contracts/interfaces/AerodromeInterfaces.sol": { + "content": "//SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.10;\n\ninterface IRouter {\n struct Route {\n address from;\n address to;\n bool stable;\n address factory;\n }\n\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n Route[] calldata routes,\n address to,\n uint deadline\n ) external;\n}\n\ninterface IVoter {\n function gauges(address pair) external view returns (address gauge);\n}\n\ninterface IGauge {\n function stake() external view returns (address token);\n\n function balanceOf(address account) external view returns (uint256 amount);\n\n function deposit(uint256 amount, uint256 tokenId) external;\n\n function depositAll(uint256 tokenId) external;\n\n function withdrawAll() external;\n\n function withdraw(uint256 amount) external;\n\n function getReward(address account, address[] memory tokens) external;\n}\n" + }, + "contracts/interfaces/LendingInterfaces.sol": { + "content": "//SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.10;\n\ninterface IMarket {\n function underlying() external view returns (address);\n\n function totalReserves() external view returns (uint256);\n\n function getCash() external view returns (uint256);\n\n function accrueInterest() external returns (uint256);\n\n function _reduceReserves(uint256 reduceAmount) external returns (uint256);\n\n /* For testing */\n function admin() external view returns (address);\n\n function reserveGuardian() external view returns (address);\n\n function _setReserveGuardian(address newReserveGuardian) external returns (uint256);\n\n function _setPendingAdmin(address newAdmin) external returns (uint256);\n\n function _acceptAdmin() external returns (uint256);\n}\n\ninterface IComptroller {\n function getAllMarkets() external view returns (address[] memory);\n}\n\ninterface ISonneTimelock {\n function _reduceReserves(address cToken, uint256 amount, address to) external;\n\n /* For testing */\n function RESERVES_ROLE() external view returns (bytes32);\n\n function grantRole(bytes32 role, address account) external;\n}\n" + }, + "contracts/interfaces/SonneMerkleDistributorInterfaces.sol": { + "content": "//SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.10;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\ninterface ISonneMerkleDistributor {\n event NewMerkle(\n address indexed creator,\n address indexed rewardToken,\n uint256 amount,\n bytes32 indexed merkleRoot,\n uint256 blockNr,\n uint256 withdrawUnlockTime\n );\n\n function rewardToken() external view returns (IERC20);\n\n function Rewards(\n uint256 blockNumber\n ) external view returns (uint256 balance, bytes32 merkleRoot, uint256 withdrawUnlockTime, uint256 ratio);\n\n function addReward(\n uint256 amount,\n bytes32 merkleRoot,\n uint256 blockNumber,\n uint256 withdrawUnlockTime,\n uint256 totalStakedBalance\n ) external;\n\n function setDelegator(address _recipient, address _delegator) external;\n\n // For testing\n\n function grantRole(bytes32 role, address account) external;\n}\n" + }, + "contracts/libraries/SafeToken.sol": { + "content": "//SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.10;\n\ninterface ERC20Interface {\n function balanceOf(address user) external view returns (uint256);\n}\n\nlibrary SafeToken {\n function myBalance(address token) internal view returns (uint256) {\n return ERC20Interface(token).balanceOf(address(this));\n }\n\n function balanceOf(address token, address user) internal view returns (uint256) {\n return ERC20Interface(token).balanceOf(user);\n }\n\n function safeApprove(\n address token,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('approve(address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeApprove');\n }\n\n function safeTransfer(\n address token,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeTransfer');\n }\n\n function safeTransferFrom(\n address token,\n address from,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\n require(success && (data.length == 0 || abi.decode(data, (bool))), '!safeTransferFrom');\n }\n\n function safeTransferETH(address to, uint256 value) internal {\n (bool success, ) = to.call{value: value}(new bytes(0));\n require(success, '!safeTransferETH');\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file